Skip to content

Commit

Permalink
Rename zeroed to zero extended
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoltan Herczeg committed Nov 18, 2024
1 parent 4b419b4 commit c0fd3d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions sljit_src/sljitConfigInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
SLJIT_MASKED_SHIFT32 : all 32 bit shifts are always masked
SLJIT_INDIRECT_CALL : see SLJIT_FUNC_ADDR() for more information
SLJIT_UPPER_BITS_IGNORED : 32 bit operations ignores the upper bits of source registers
SLJIT_UPPER_BITS_ZEROED : 32 bit operations clears the upper bits of destination registers
SLJIT_UPPER_BITS_ZERO_EXTENDED : 32 bit operations clears the upper bits of destination registers
SLJIT_UPPER_BITS_SIGN_EXTENDED : 32 bit operations replicates the sign bit in the upper bits of destination registers
SLJIT_UPPER_BITS_PRESERVED : 32 bit operations preserves the upper bits of destination registers
Expand Down Expand Up @@ -609,7 +609,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void *code);
#define SLJIT_MASKED_SHIFT 1
#define SLJIT_MASKED_SHIFT32 1
#define SLJIT_UPPER_BITS_IGNORED 1
#define SLJIT_UPPER_BITS_ZEROED 1
#define SLJIT_UPPER_BITS_ZERO_EXTENDED 1

#elif (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)

Expand All @@ -633,7 +633,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void *code);
#define SLJIT_MASKED_SHIFT 1
#define SLJIT_MASKED_SHIFT32 1
#define SLJIT_UPPER_BITS_IGNORED 1
#define SLJIT_UPPER_BITS_ZEROED 1
#define SLJIT_UPPER_BITS_ZERO_EXTENDED 1

#elif (defined SLJIT_CONFIG_ARM_32 && SLJIT_CONFIG_ARM_32)

Expand Down Expand Up @@ -663,7 +663,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void *code);
#define SLJIT_MASKED_SHIFT 1
#define SLJIT_MASKED_SHIFT32 1
#define SLJIT_UPPER_BITS_IGNORED 1
#define SLJIT_UPPER_BITS_ZEROED 1
#define SLJIT_UPPER_BITS_ZERO_EXTENDED 1

#elif (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC)

Expand Down Expand Up @@ -816,7 +816,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void *code);
#define SLJIT_NUMBER_OF_SCRATCH_VECTOR_REGISTERS \
(SLJIT_NUMBER_OF_VECTOR_REGISTERS - SLJIT_NUMBER_OF_SAVED_VECTOR_REGISTERS)

#if (defined SLJIT_UPPER_BITS_ZEROED && SLJIT_UPPER_BITS_ZEROED) \
#if (defined SLJIT_UPPER_BITS_ZERO_EXTENDED && SLJIT_UPPER_BITS_ZERO_EXTENDED) \
+ (defined SLJIT_UPPER_BITS_SIGN_EXTENDED && SLJIT_UPPER_BITS_SIGN_EXTENDED) \
+ (defined SLJIT_UPPER_BITS_PRESERVED && SLJIT_UPPER_BITS_PRESERVED) > 1
#error "Invalid upper bits defintion"
Expand Down
4 changes: 2 additions & 2 deletions test_src/sljitTest.c
Original file line number Diff line number Diff line change
Expand Up @@ -9065,7 +9065,7 @@ static void test76(void)
sljit_emit_op1(compiler, SLJIT_MOV32, SLJIT_MEM1(SLJIT_S0), 2 * sizeof(sljit_sw), SLJIT_R0, 0);
sljit_emit_op1(compiler, SLJIT_MOV32, SLJIT_MEM1(SLJIT_S0), 3 * sizeof(sljit_sw), SLJIT_R1, 0);
#endif
#if (defined SLJIT_UPPER_BITS_ZEROED && SLJIT_UPPER_BITS_ZEROED)
#if (defined SLJIT_UPPER_BITS_ZERO_EXTENDED && SLJIT_UPPER_BITS_ZERO_EXTENDED)
sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 123456789);
sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R1, 0, SLJIT_IMM, 234567890);
sljit_emit_op2(compiler, SLJIT_MUL, SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_R1, 0);
Expand Down Expand Up @@ -9115,7 +9115,7 @@ static void test76(void)
FAILED(*(sljit_s32*)(buf + 2) != -34567, "test76 case 3 failed\n");
FAILED(*(sljit_s32*)(buf + 3) != -567, "test76 case 4 failed\n");
#endif
#if (defined SLJIT_UPPER_BITS_ZEROED && SLJIT_UPPER_BITS_ZEROED)
#if (defined SLJIT_UPPER_BITS_ZERO_EXTENDED && SLJIT_UPPER_BITS_ZERO_EXTENDED)
FAILED(buf[4] != SLJIT_W(28958998501905210), "test76 case 5 failed\n");
FAILED(buf[5] != 1119998778, "test76 case 6 failed\n");
#endif
Expand Down

0 comments on commit c0fd3d1

Please sign in to comment.