all repos — mgba @ 73cb853ae48afac00f36f2a49902b458c90b660b

mGBA Game Boy Advance Emulator

ARM: Simplify addition OverflowFrom
Vicki Pfau vi@endrift.com
Fri, 29 Mar 2019 22:17:09 -0700
commit

73cb853ae48afac00f36f2a49902b458c90b660b

parent

45ec6e50e23532b02c492657f781c26221698464

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M include/mgba/internal/arm/isa-inlines.hinclude/mgba/internal/arm/isa-inlines.h

@@ -34,7 +34,7 @@

#define ARM_CARRY_FROM(M, N, D) (((uint32_t) (M) >> 31) + ((uint32_t) (N) >> 31) > ((uint32_t) (D) >> 31)) #define ARM_BORROW_FROM(M, N, D) (((uint32_t) (M)) >= ((uint32_t) (N))) #define ARM_BORROW_FROM_CARRY(M, N, D, C) (ARM_UXT_64(M) >= (ARM_UXT_64(N)) + (uint64_t) (C)) -#define ARM_V_ADDITION(M, N, D) (!(ARM_SIGN((M) ^ (N))) && (ARM_SIGN((M) ^ (D))) && (ARM_SIGN((N) ^ (D)))) +#define ARM_V_ADDITION(M, N, D) (!(ARM_SIGN((M) ^ (N))) && (ARM_SIGN((M) ^ (D)))) #define ARM_V_SUBTRACTION(M, N, D) ((ARM_SIGN((M) ^ (N))) && (ARM_SIGN((M) ^ (D)))) #define ARM_WAIT_MUL(R) \