Browse Source

Disable ASan; bugfix for immediate masks.

master
Ben Kurtovic 9 years ago
parent
commit
981c4d4783
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      makefile
  2. +2
    -2
      src/assembler/parse_util.c

+ 1
- 1
makefile View File

@@ -24,7 +24,7 @@ DIRS = $(sort $(dir $(OBJS)))


ifdef DEBUG ifdef DEBUG
BNRY := $(BNRY)$(DEVEXT) BNRY := $(BNRY)$(DEVEXT)
FLAGS += -g -fsanitize=address -DDEBUG_MODE
FLAGS += -g -DDEBUG_MODE
MODE = debug MODE = debug
endif endif




+ 2
- 2
src/assembler/parse_util.c View File

@@ -362,10 +362,10 @@ bool argparse_immediate(ASMArgImmediate *result, ASMArgParseInfo ai)
const ASMDefine *define = asm_deftable_find(ai.deftable, ai.arg, ai.size); const ASMDefine *define = asm_deftable_find(ai.deftable, ai.arg, ai.size);
if (define) { if (define) {
if (negative) { if (negative) {
calculate_immediate_mask(result);
result->is_label = false; result->is_label = false;
result->uval = define->value.uval; result->uval = define->value.uval;
result->sval = -define->value.sval; result->sval = -define->value.sval;
calculate_immediate_mask(result);
} else { } else {
*result = define->value; *result = define->value;
} }
@@ -386,10 +386,10 @@ bool argparse_immediate(ASMArgImmediate *result, ASMArgParseInfo ai)
if (sval < INT16_MIN) if (sval < INT16_MIN)
return false; return false;


calculate_immediate_mask(result);
result->is_label = false; result->is_label = false;
result->uval = uval; result->uval = uval;
result->sval = sval; result->sval = sval;
calculate_immediate_mask(result);
return true; return true;
} }




Loading…
Cancel
Save