scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

types.c (1063B)


      1 #include <scc/scc.h>
      2 
      3 #include "../cc2.h"
      4 
      5 
      6 Type int8type = {
      7 	.flags  = SIGNF | INTF,
      8 	.size   = 1,
      9 	.align  = 1
     10 };
     11 
     12 Type int16type = {
     13 	.flags  = SIGNF | INTF,
     14 	.size   = 2,
     15 	.align  = 1
     16 };
     17 
     18 Type int32type = {
     19 	.flags  = SIGNF | INTF,
     20 	.size   = 4,
     21 	.align  = 1
     22 };
     23 
     24 Type int64type = {
     25 	.flags  = SIGNF | INTF,
     26 	.size   = 8,
     27 	.align  = 1
     28 };
     29 
     30 Type uint8type = {
     31 	.flags  = INTF,
     32 	.size   = 1,
     33 	.align  = 1
     34 };
     35 
     36 Type uint16type = {
     37 	.flags  = INTF,
     38 	.size   = 2,
     39 	.align  = 1
     40 };
     41 
     42 Type uint32type = {
     43 	.flags  = INTF,
     44 	.size   = 4,
     45 	.align  = 1
     46 };
     47 
     48 Type uint64type = {
     49 	.flags  = INTF,
     50 	.size   = 8,
     51 	.align  = 1
     52 };
     53 
     54 Type ptrtype = {
     55 	.flags  = INTF,
     56 	.size   = 2,
     57 	.align  = 1
     58 };
     59 
     60 Type booltype = {
     61 	.flags  = INTF,
     62 	.size   = 1,
     63 	.align  = 1
     64 };
     65 
     66 Type float32type = {
     67 	.flags  = FLOATF,
     68 	.size   = 4,
     69 	.align  = 1
     70 };
     71 
     72 Type float64type = {
     73 	.flags  = FLOATF,
     74 	.size   = 4,
     75 	.align  = 1
     76 };
     77 
     78 Type float80type = {
     79 	.flags  = FLOATF,
     80 	.size   = 4,
     81 	.align  = 1
     82 };
     83 
     84 Type voidtype = {
     85 	.size = 0,
     86 	.align = 0
     87 };
     88 
     89 Type arg_type = {
     90         .size = 2,
     91         .align = 1
     92 };