aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2015-08-18 16:06:28 -0700
committerChih-Hung Hsieh <chh@google.com>2015-08-18 16:07:38 -0700
commit167fe824b7478130798fae317034a006907b1567 (patch)
tree44e4890d25c2643b975aa3ac2a2f2c76e0cd631e
parent1dae686531927208eca3dc4f99e117ff28aeba97 (diff)
downloadjpeg-167fe824b7478130798fae317034a006907b1567.tar.gz
Use unified syntax to compile with both llvm and gas.
* Remove useless stab debug info directive .func/.endfunc, which are not recognized by clang/llvm integrated assembler. * Replace orreqs with orrseq. * Use full syntax of ldrd. * New assembler output code is identical to old gas output. Change-Id: I5144e75a8459ce9630477513d4b4570f624257a0
-rw-r--r--Android.mk3
-rw-r--r--armv6_idct.S17
-rw-r--r--jsimd_arm_neon.S5
3 files changed, 8 insertions, 17 deletions
diff --git a/Android.mk b/Android.mk
index db87e77..f5371b4 100644
--- a/Android.mk
+++ b/Android.mk
@@ -15,9 +15,6 @@ LOCAL_SRC_FILES := \
LOCAL_SRC_FILES_arm += armv6_idct.S
-# jsimd_arm_neon.S does not compile with clang.
-LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as
-
ifeq (,$(TARGET_BUILD_APPS))
# building against master
# use ashmem as libjpeg decoder's backing store
diff --git a/armv6_idct.S b/armv6_idct.S
index 843c2dd..51d62e6 100644
--- a/armv6_idct.S
+++ b/armv6_idct.S
@@ -61,10 +61,10 @@
// void armv6_idct(short *coefs, int *quans, unsigned char *rows, int col)
.arm
+ .syntax unified
.text
.align
.global armv6_idct
- .func armv6_idct
armv6_idct:
// Push everything except sp (r13) and pc (r15).
@@ -97,9 +97,9 @@ pass1_head:
// Check if ACs are all zero.
cmp r0, #0
- orreqs r8, r1, r2
- orreqs r8, r3, r5
- orreqs r8, r6, r7
+ orrseq r8, r1, r2
+ orrseq r8, r3, r5
+ orrseq r8, r6, r7
beq pass1_zero
// Step 1: Dequantizations.
@@ -128,8 +128,8 @@ pass1_head:
mla r1, r10, r1, r7
mla r3, r11, r3, r5
- // Load constants.
- ldrd r10, constants
+ // Load constants to r10, r11.
+ ldrd r10, r11, constants
// Step 2: Rotations and Butterflies.
@@ -230,8 +230,8 @@ pass1_tail:
ldr r12, [sp, #256]
ldr r14, [sp, #260]
- // Load constants.
- ldrd r10, constants
+ // Load constants to r10, r11.
+ ldrd r10, r11, constants
pass2_head:
// Load coefficients. (c[0, 1, 2, 3, 4, 5, 6, 7])
@@ -355,4 +355,3 @@ pass2_tail:
ldmia sp!, {r4, r5, r6, r7, r8, r9, r10, r11, r12, r14}
bx lr
- .endfunc
diff --git a/jsimd_arm_neon.S b/jsimd_arm_neon.S
index cc0d540..04fd9b2 100644
--- a/jsimd_arm_neon.S
+++ b/jsimd_arm_neon.S
@@ -67,7 +67,6 @@
/* Supplementary macro for setting function attributes */
.macro asm_function fname
- .func \fname
.global \fname
#ifdef __ELF__
.hidden \fname
@@ -278,7 +277,6 @@ asm_function jsimd_idct_ifast_neon
.unreq OUTPUT_BUF
.unreq OUTPUT_COL
.unreq TMP
-.endfunc
.purgem idct_helper
@@ -493,7 +491,6 @@ asm_function jsimd_idct_4x4_neon
.unreq TMP2
.unreq TMP3
.unreq TMP4
-.endfunc
.purgem idct_helper
@@ -641,7 +638,6 @@ asm_function jsimd_idct_2x2_neon
.unreq OUTPUT_COL
.unreq TMP1
.unreq TMP2
-.endfunc
.purgem idct_helper
@@ -896,7 +892,6 @@ asm_function jsimd_ycc_\colorid\()_convert_neon
.unreq U
.unreq V
.unreq N
-.endfunc
.purgem do_yuv_to_rgb