|
@ -92,72 +92,41 @@ static inline Table* initTable() { |
|
|
Table *table = malloc(sizeof(Table)); |
|
|
Table *table = malloc(sizeof(Table)); |
|
|
table->entries = (TableEntry**) calloc(sizeof(TableEntry*), TABLE_NUM_LANES); |
|
|
table->entries = (TableEntry**) calloc(sizeof(TableEntry*), TABLE_NUM_LANES); |
|
|
|
|
|
|
|
|
insertPadZeroes(table, "char", sizeof(char), sizeof(char)); |
|
|
|
|
|
insertPadZeroes(table, "signed char", sizeof(signed char), sizeof(signed char)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned char", sizeof(unsigned char), sizeof(unsigned char)); |
|
|
|
|
|
insertPadZeroes(table, "short", sizeof(short), sizeof(short)); |
|
|
|
|
|
insertPadZeroes(table, "short int", sizeof(short int), sizeof(short int)); |
|
|
|
|
|
insertPadZeroes(table, "signed short", sizeof(signed short), sizeof(signed short)); |
|
|
|
|
|
insertPadZeroes(table, "signed short int", sizeof(signed short int), sizeof(signed short int)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned short", sizeof(unsigned short), sizeof(unsigned short)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned short int", sizeof(unsigned short int), sizeof(unsigned short int)); |
|
|
|
|
|
insertPadZeroes(table, "int", sizeof(int), sizeof(int)); |
|
|
|
|
|
insertPadZeroes(table, "signed", sizeof(signed), sizeof(signed)); |
|
|
|
|
|
insertPadZeroes(table, "signed int", sizeof(signed int), sizeof(signed int)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned", sizeof(unsigned), sizeof(unsigned)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned int", sizeof(unsigned int), sizeof(unsigned int)); |
|
|
|
|
|
insertPadZeroes(table, "long", sizeof(long), sizeof(long)); |
|
|
|
|
|
insertPadZeroes(table, "long int", sizeof(long int), sizeof(long int)); |
|
|
|
|
|
insertPadZeroes(table, "signed long", sizeof(signed long), sizeof(signed long)); |
|
|
|
|
|
insertPadZeroes(table, "signed long int", sizeof(signed long int), sizeof(signed long int)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned long", sizeof(unsigned long), sizeof(unsigned long)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned long int", sizeof(unsigned long int), sizeof(unsigned long int)); |
|
|
|
|
|
insertPadZeroes(table, "long long", sizeof(long long), sizeof(long long)); |
|
|
|
|
|
insertPadZeroes(table, "long long int", sizeof(long long int), sizeof(long long int)); |
|
|
|
|
|
insertPadZeroes(table, "signed long long", sizeof(signed long long), sizeof(signed long long)); |
|
|
|
|
|
insertPadZeroes(table, "signed long long int", sizeof(signed long long int), sizeof(signed long long int)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned long long", sizeof(unsigned long long), sizeof(unsigned long long)); |
|
|
|
|
|
|
|
|
// alignof === sizeof for primitive data types, C99 doesn't have 'alignof' |
|
|
|
|
|
insertPadZeroes(table, "char", sizeof(char), sizeof(char)); |
|
|
|
|
|
insertPadZeroes(table, "signed char", sizeof(signed char), sizeof(signed char)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned char", sizeof(unsigned char), sizeof(unsigned char)); |
|
|
|
|
|
insertPadZeroes(table, "short", sizeof(short), sizeof(short)); |
|
|
|
|
|
insertPadZeroes(table, "short int", sizeof(short int), sizeof(short int)); |
|
|
|
|
|
insertPadZeroes(table, "signed short", sizeof(signed short), sizeof(signed short)); |
|
|
|
|
|
insertPadZeroes(table, "signed short int", sizeof(signed short int), sizeof(signed short int)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned short", sizeof(unsigned short), sizeof(unsigned short)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned short int", sizeof(unsigned short int), sizeof(unsigned short int)); |
|
|
|
|
|
insertPadZeroes(table, "int", sizeof(int), sizeof(int)); |
|
|
|
|
|
insertPadZeroes(table, "signed", sizeof(signed), sizeof(signed)); |
|
|
|
|
|
insertPadZeroes(table, "signed int", sizeof(signed int), sizeof(signed int)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned", sizeof(unsigned), sizeof(unsigned)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned int", sizeof(unsigned int), sizeof(unsigned int)); |
|
|
|
|
|
insertPadZeroes(table, "long", sizeof(long), sizeof(long)); |
|
|
|
|
|
insertPadZeroes(table, "long int", sizeof(long int), sizeof(long int)); |
|
|
|
|
|
insertPadZeroes(table, "signed long", sizeof(signed long), sizeof(signed long)); |
|
|
|
|
|
insertPadZeroes(table, "signed long int", sizeof(signed long int), sizeof(signed long int)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned long", sizeof(unsigned long), sizeof(unsigned long)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned long int", sizeof(unsigned long int), sizeof(unsigned long int)); |
|
|
|
|
|
insertPadZeroes(table, "long long", sizeof(long long), sizeof(long long)); |
|
|
|
|
|
insertPadZeroes(table, "long long int", sizeof(long long int), sizeof(long long int)); |
|
|
|
|
|
insertPadZeroes(table, "signed long long", sizeof(signed long long), sizeof(signed long long)); |
|
|
|
|
|
insertPadZeroes(table, "signed long long int", sizeof(signed long long int), sizeof(signed long long int)); |
|
|
|
|
|
insertPadZeroes(table, "unsigned long long", sizeof(unsigned long long), sizeof(unsigned long long)); |
|
|
insertPadZeroes(table, "unsigned long long int", sizeof(unsigned long long int), sizeof(unsigned long long int)); |
|
|
insertPadZeroes(table, "unsigned long long int", sizeof(unsigned long long int), sizeof(unsigned long long int)); |
|
|
insertPadZeroes(table, "float", sizeof(float), sizeof(float)); |
|
|
|
|
|
insertPadZeroes(table, "double", sizeof(double), sizeof(double)); |
|
|
|
|
|
insertPadZeroes(table, "long double", sizeof(long double), sizeof(long double)); |
|
|
|
|
|
|
|
|
|
|
|
insertPadZeroes(table, "size_t", sizeof(size_t), sizeof(size_t)); |
|
|
|
|
|
insertPadZeroes(table, "ssize_t", sizeof(ssize_t), sizeof(ssize_t)); |
|
|
|
|
|
insertPadZeroes(table, "bool", sizeof(bool), sizeof(bool)); |
|
|
|
|
|
insertPadZeroes(table, "_Bool", sizeof(_Bool), sizeof(_Bool)); |
|
|
|
|
|
|
|
|
|
|
|
//char |
|
|
|
|
|
//signed char |
|
|
|
|
|
//unsigned char |
|
|
|
|
|
//short |
|
|
|
|
|
//short int |
|
|
|
|
|
//signed short |
|
|
|
|
|
//signed short int |
|
|
|
|
|
//unsigned short |
|
|
|
|
|
//unsigned short int |
|
|
|
|
|
//int |
|
|
|
|
|
//signed |
|
|
|
|
|
//signed int |
|
|
|
|
|
//unsigned |
|
|
|
|
|
//unsigned int |
|
|
|
|
|
//long |
|
|
|
|
|
//long int |
|
|
|
|
|
//signed long |
|
|
|
|
|
//signed long int |
|
|
|
|
|
//unsigned long |
|
|
|
|
|
//unsigned long int |
|
|
|
|
|
//long long |
|
|
|
|
|
//long long int |
|
|
|
|
|
//signed long long |
|
|
|
|
|
//signed long long int |
|
|
|
|
|
//unsigned long long |
|
|
|
|
|
//unsigned long long int |
|
|
|
|
|
//float |
|
|
|
|
|
//double |
|
|
|
|
|
//long double |
|
|
|
|
|
|
|
|
|
|
|
//traversePrint(table); |
|
|
|
|
|
|
|
|
insertPadZeroes(table, "float", sizeof(float), sizeof(float)); |
|
|
|
|
|
insertPadZeroes(table, "double", sizeof(double), sizeof(double)); |
|
|
|
|
|
insertPadZeroes(table, "long double", sizeof(long double), sizeof(long double)); |
|
|
|
|
|
|
|
|
|
|
|
insertPadZeroes(table, "size_t", sizeof(size_t), sizeof(size_t)); |
|
|
|
|
|
insertPadZeroes(table, "ssize_t", sizeof(ssize_t), sizeof(ssize_t)); |
|
|
|
|
|
insertPadZeroes(table, "bool", sizeof(bool), sizeof(bool)); |
|
|
|
|
|
insertPadZeroes(table, "_Bool", sizeof(_Bool), sizeof(_Bool)); |
|
|
|
|
|
|
|
|
return table; |
|
|
return table; |
|
|
} |
|
|
} |
|
|