changeset 347:0fb4610ddb73

[project @ 2004-11-08 21:19:47 by bellard] update
author bellard
date Mon, 08 Nov 2004 21:19:47 +0000
parents fa64b1d3d742
children 96ea19a25c55
files tcc-doc.texi
diffstat 1 files changed, 48 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/tcc-doc.texi	Sat Oct 07 14:44:15 2006 -0400
+++ b/tcc-doc.texi	Mon Nov 08 21:19:47 2004 +0000
@@ -403,6 +403,13 @@
 @end itemize
 
 @section GNU C extensions
+@cindex aligned attribute
+@cindex packed attribute
+@cindex section attribute
+@cindex unused attribute
+@cindex cdecl attribute
+@cindex stdcall attribute
+@cindex regparm attribute
 
 TCC implements some GNU C extensions:
 
@@ -439,18 +446,27 @@
 @item The keyword @code{__attribute__} is handled to specify variable or
 function attributes. The following attributes are supported:
   @itemize
-  @item @code{aligned(n)}: align data to n bytes (must be a power of two).
 
-  @item @code{section(name)}: generate function or data in assembly
-  section name (name is a string containing the section name) instead
-  of the default section.
+  @item @code{aligned(n)}: align a variable or a structure field to n bytes
+(must be a power of two).
+  
+  @item @code{packed}: force alignment of a variable or a structure field to
+  1.
+
+  @item @code{section(name)}: generate function or data in assembly section
+name (name is a string containing the section name) instead of the default
+section.
 
   @item @code{unused}: specify that the variable or the function is unused.
 
-  @item @code{cdecl}: use standard C calling convention.
+  @item @code{cdecl}: use standard C calling convention (default).
 
   @item @code{stdcall}: use Pascal-like calling convention.
 
+  @item @code{regparm(n)}: use fast i386 calling convention. @var{n} must be
+between 1 and 3. The first @var{n} function parameters are respectively put in
+registers @code{%eax}, @code{%edx} and @code{%ecx}.
+
   @end itemize
 
 Here are some examples:
@@ -615,21 +631,27 @@
 @section Directives
 @cindex assembler directives
 @cindex directives, assembler
-@cindex .align
-@cindex .skip
-@cindex .space
-@cindex .byte
-@cindex .word
-@cindex .short
-@cindex .int
-@cindex .long
-@cindex .string
-@cindex .globl
-@cindex .global
-@cindex .section
-@cindex .text
-@cindex .data
-@cindex .bss
+@cindex align directive
+@cindex skip directive
+@cindex space directive
+@cindex byte directive
+@cindex word directive
+@cindex short directive
+@cindex int directive
+@cindex long directive
+@cindex quad directive
+@cindex globl directive
+@cindex global directive
+@cindex section directive
+@cindex text directive
+@cindex data directive
+@cindex bss directive
+@cindex fill directive
+@cindex org directive
+@cindex previous directive
+@cindex string directive
+@cindex asciz directive
+@cindex ascii directive
 
 All directives are preceeded by a '.'. The following directives are
 supported:
@@ -638,12 +660,12 @@
 @item .align n[,value]
 @item .skip n[,value]
 @item .space n[,value]
-@item .byte value1[,value2...]
-@item .word value1[,value2...]
-@item .short value1[,value2...]
-@item .int value1[,value2...]
-@item .long value1[,value2...]
-@item .string string
+@item .byte value1[,...]
+@item .word value1[,...]
+@item .short value1[,...]
+@item .int value1[,...]
+@item .long value1[,...]
+@item .quad immediate_value1[,...]
 @item .globl symbol
 @item .global symbol
 @item .section section