X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=generator.c;h=709e5a65cbfb513cd502e2bf7d70383b89468449;hb=1bf625553dc35ac4a5c1afceb6950fd44776a424;hp=419a2b22c4c2dbb765a9656163f701c645637eb8;hpb=2d029d2c2b27639e3a2b6c43e63788b00110818e;p=dsw-obn.git diff --git a/generator.c b/generator.c index 419a2b2..709e5a6 100644 --- a/generator.c +++ b/generator.c @@ -103,7 +103,11 @@ oberon_generator_init_type(oberon_context_t * ctx, oberon_type_t * type) } else if(type -> class == OBERON_TYPE_RECORD) { - gcc_struct = gcc_jit_context_new_opaque_struct(gcc_context, NULL, ""); + char name[32]; + snprintf(name, 32, "RECORD%u", gen_context -> record_count); + gen_context -> record_count += 1; + + gcc_struct = gcc_jit_context_new_opaque_struct(gcc_context, NULL, name); gcc_type = gcc_jit_struct_as_type(gcc_struct); } else if(type -> class == OBERON_TYPE_POINTER) @@ -515,14 +519,19 @@ struct { enum gcc_jit_comparison comp_op; }; } op_table[] = { - { 0, .unary_op = GCC_JIT_UNARY_OP_LOGICAL_NEGATE }, { 0, .unary_op = GCC_JIT_UNARY_OP_MINUS }, + { 0, .unary_op = GCC_JIT_UNARY_OP_BITWISE_NEGATE }, + { 0, .unary_op = GCC_JIT_UNARY_OP_LOGICAL_NEGATE }, + { 0, .unary_op = GCC_JIT_UNARY_OP_ABS }, { 1, .binary_op = GCC_JIT_BINARY_OP_PLUS }, { 1, .binary_op = GCC_JIT_BINARY_OP_MINUS }, { 1, .binary_op = GCC_JIT_BINARY_OP_MULT }, { 1, .binary_op = GCC_JIT_BINARY_OP_DIVIDE }, { 1, .binary_op = GCC_JIT_BINARY_OP_MODULO }, + { 1, .binary_op = GCC_JIT_BINARY_OP_BITWISE_AND }, + { 1, .binary_op = GCC_JIT_BINARY_OP_BITWISE_XOR }, + { 1, .binary_op = GCC_JIT_BINARY_OP_BITWISE_OR }, { 1, .binary_op = GCC_JIT_BINARY_OP_LOGICAL_AND }, { 1, .binary_op = GCC_JIT_BINARY_OP_LOGICAL_OR },