Damien Zammit has uploaded this change for review. ( https://review.coreboot.org/21358
Change subject: arm/libgcc/lib1funcs.S: Workaround for clang ......................................................................
arm/libgcc/lib1funcs.S: Workaround for clang
clang does not understand `movnes` and `subges` opcodes so use the corresponding opcodes it knows about
Change-Id: I2150cc14f8a0ce7f819f29c49cb00c695448bc10 Signed-off-by: Damien Zammit damien@zamaudio.com --- M src/arch/arm/libgcc/lib1funcs.S 1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/21358/1
diff --git a/src/arch/arm/libgcc/lib1funcs.S b/src/arch/arm/libgcc/lib1funcs.S index a642185..6ee1feb 100644 --- a/src/arch/arm/libgcc/lib1funcs.S +++ b/src/arch/arm/libgcc/lib1funcs.S @@ -92,7 +92,11 @@ subhs \dividend, \dividend, \divisor, lsr #3 orrhs \result, \result, \curbit, lsr #3 cmp \dividend, #0 @ Early termination? +#if IS_ENABLED(CONFIG_COMPILER_GCC) movnes \curbit, \curbit, lsr #4 @ No, any more bits to do? +#else + lsrsne \curbit, \curbit, #4 @ No, any more bits to do? +#endif movne \divisor, \divisor, lsr #4 bne 1b
@@ -178,7 +182,11 @@ subhs \dividend, \dividend, \divisor, lsr #3 cmp \dividend, #1 mov \divisor, \divisor, lsr #4 +#if IS_ENABLED(CONFIG_COMPILER_GCC) subges \order, \order, #4 +#else + subsge \order, \order, #4 +#endif bge 1b
tst \order, #3