scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

types.c (1054B)


      1 /* See LICENSE file for copyright and license details. */
      2 #include "arch.h"
      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  = 2
     16 };
     17 
     18 Type int32type = {
     19 	.flags  = SIGNF | INTF,
     20 	.size   = 4,
     21 	.align  = 4
     22 };
     23 
     24 Type int64type = {
     25 	.flags  = SIGNF | INTF,
     26 	.size   = 8,
     27 	.align  = 4
     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  = 2
     40 };
     41 
     42 Type uint32type = {
     43 	.flags  = INTF,
     44 	.size   = 4,
     45 	.align  = 2
     46 };
     47 
     48 Type uint64type = {
     49 	.flags  = INTF,
     50 	.size   = 8,
     51 	.align  = 4
     52 };
     53 
     54 Type ptrtype = {
     55 	.flags  = INTF,
     56 	.size   = 4,
     57 	.align  = 4
     58 };
     59 
     60 Type booltype = {
     61 	.flags  = INTF,
     62 	.size   = 1,
     63 	.align  = 1
     64 };
     65 
     66 Type float32type = {
     67 	.size   = 4,
     68 	.align  = 4
     69 };
     70 
     71 Type float64type = {
     72 	.size   = 8,
     73 	.align  = 4
     74 };
     75 
     76 Type float80type = {
     77 	.size   = 12,
     78 	.align  =  4
     79 };
     80 
     81 Type voidtype = {
     82 	.size = 0,
     83 	.align = 0
     84 };
     85 
     86 Type elipsistype = {
     87 	.size = 0,
     88 	.align = 0
     89 };