-
- Downloads
py/emitnative: Fix x86 native zero checks by comparing full word.
On x86 archs (both 32 and 64 bit) a bool return value only sets the 8-bit al register, and the higher bits of the ax register have an undefined value. When testing the return value of such cases it is required to just test al for zero/non-zero. On the other hand, checking for truth or zero/non-zero on an integer return value requires checking all bits of the register. These two cases must be distinguished and handled correctly in generated native code. This patch makes sure of this. For other supported native archs (ARM, Thumb2, Xtensa) there is no such distinction and this patch does not change anything for them.
Showing
- py/asmarm.h 2 additions, 2 deletionspy/asmarm.h
- py/asmthumb.h 2 additions, 2 deletionspy/asmthumb.h
- py/asmx64.c 5 additions, 0 deletionspy/asmx64.c
- py/asmx64.h 13 additions, 4 deletionspy/asmx64.h
- py/asmx86.c 5 additions, 0 deletionspy/asmx86.c
- py/asmx86.h 13 additions, 4 deletionspy/asmx86.h
- py/asmxtensa.h 2 additions, 2 deletionspy/asmxtensa.h
- py/emitnative.c 6 additions, 6 deletionspy/emitnative.c
Loading
Please register or sign in to comment