target-arm: fix addsub/subadd implementation
Signed-off-by: Chih-Min Chao <cmchao@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
d6f3a84511
commit
bb42e28bdb
@ -73,8 +73,8 @@ uint32_t HELPER(glue(PFX,subaddx))(uint32_t a, uint32_t b GE_ARG)
|
||||
uint32_t res = 0;
|
||||
DECLARE_GE;
|
||||
|
||||
ADD16(a, b, 0);
|
||||
SUB16(a >> 16, b >> 16, 1);
|
||||
ADD16(a, b >> 16, 0);
|
||||
SUB16(a >> 16, b, 1);
|
||||
SET_GE;
|
||||
return res;
|
||||
}
|
||||
@ -84,8 +84,8 @@ uint32_t HELPER(glue(PFX,addsubx))(uint32_t a, uint32_t b GE_ARG)
|
||||
uint32_t res = 0;
|
||||
DECLARE_GE;
|
||||
|
||||
SUB16(a, b, 0);
|
||||
ADD16(a >> 16, b >> 16, 1);
|
||||
SUB16(a, b >> 16, 0);
|
||||
ADD16(a >> 16, b, 1);
|
||||
SET_GE;
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user