From e23c0ad8203bbfda72320affa385760e85fa5ac2 Mon Sep 17 00:00:00 2001 From: Jie Zhang Date: Fri, 26 Feb 2010 15:49:07 +0000 Subject: [PATCH] 2010-02-26 Jie Zhang * config/tc-arm.c (do_neon_ld_st_interleave): Reject bad alignment. testsuite/ * gas/arm/neon-ldst-align-bad.d: New test. * gas/arm/neon-ldst-align-bad.l: New test. * gas/arm/neon-ldst-align-bad.s: New test. --- gas/ChangeLog | 5 +++++ gas/config/tc-arm.c | 5 +++-- gas/testsuite/ChangeLog | 6 ++++++ gas/testsuite/gas/arm/neon-ldst-align-bad.d | 3 +++ gas/testsuite/gas/arm/neon-ldst-align-bad.l | 3 +++ gas/testsuite/gas/arm/neon-ldst-align-bad.s | 2 ++ 6 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 gas/testsuite/gas/arm/neon-ldst-align-bad.d create mode 100644 gas/testsuite/gas/arm/neon-ldst-align-bad.l create mode 100644 gas/testsuite/gas/arm/neon-ldst-align-bad.s diff --git a/gas/ChangeLog b/gas/ChangeLog index f06125009a9..e9cf498f2d4 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2010-02-26 Jie Zhang + + * config/tc-arm.c (do_neon_ld_st_interleave): Reject bad + alignment. + 2010-02-25 Doug Evans * cgen.c: Whitespace fixes. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 7ef0f44bc98..d17204228d6 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -14662,12 +14662,13 @@ do_neon_ld_st_interleave (void) { case 64: alignbits = 1; break; case 128: - if (NEON_REGLIST_LENGTH (inst.operands[0].imm) == 3) + if (NEON_REGLIST_LENGTH (inst.operands[0].imm) != 2 + && NEON_REGLIST_LENGTH (inst.operands[0].imm) != 4) goto bad_alignment; alignbits = 2; break; case 256: - if (NEON_REGLIST_LENGTH (inst.operands[0].imm) == 3) + if (NEON_REGLIST_LENGTH (inst.operands[0].imm) != 4) goto bad_alignment; alignbits = 3; break; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 439e7347d77..3dc4271073c 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-02-26 Jie Zhang + + * gas/arm/neon-ldst-align-bad.d: New test. + * gas/arm/neon-ldst-align-bad.l: New test. + * gas/arm/neon-ldst-align-bad.s: New test. + 2010-02-25 Wu Zhangjin * gas/mips/loongson-2f-2.s: New test of -mfix-loongson2f-nop. diff --git a/gas/testsuite/gas/arm/neon-ldst-align-bad.d b/gas/testsuite/gas/arm/neon-ldst-align-bad.d new file mode 100644 index 00000000000..28ebb9d40b1 --- /dev/null +++ b/gas/testsuite/gas/arm/neon-ldst-align-bad.d @@ -0,0 +1,3 @@ +# name: Bad alignment in Advanced SIMD Neon instructions +# as: -mfpu=neon +# error-output: neon-ldst-align-bad.l diff --git a/gas/testsuite/gas/arm/neon-ldst-align-bad.l b/gas/testsuite/gas/arm/neon-ldst-align-bad.l new file mode 100644 index 00000000000..89cafba3655 --- /dev/null +++ b/gas/testsuite/gas/arm/neon-ldst-align-bad.l @@ -0,0 +1,3 @@ +[^:]*: Assembler messages: +[^:]*:1: Error: bad alignment -- `vld1.8 {d0},\[r0,:128\]' +[^:]*:2: Error: bad alignment -- `vld1.8 {q0},\[r0,:256\]' diff --git a/gas/testsuite/gas/arm/neon-ldst-align-bad.s b/gas/testsuite/gas/arm/neon-ldst-align-bad.s new file mode 100644 index 00000000000..0efb0a060d4 --- /dev/null +++ b/gas/testsuite/gas/arm/neon-ldst-align-bad.s @@ -0,0 +1,2 @@ +vld1.8 {d0}, [r0, :128] +vld1.8 {q0}, [r0, :256] -- 2.30.2