diff options
author | Nick Clifton <nickc@redhat.com> | 2009-07-14 15:47:13 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-07-14 15:47:13 +0000 |
commit | 140033b39116ffc7d6ca946c43c19880e2e48a0c (patch) | |
tree | 0e6bae58789dcd43d40075c3fc1dc66f2fc45d1b /gas | |
parent | 63b33ceb0b1e4c8554b7d773d068819aa5ca2af6 (diff) | |
download | gdb-140033b39116ffc7d6ca946c43c19880e2e48a0c.zip gdb-140033b39116ffc7d6ca946c43c19880e2e48a0c.tar.gz gdb-140033b39116ffc7d6ca946c43c19880e2e48a0c.tar.bz2 |
* config/tc-arm.h (MAX_MEM_ALIGNMENT_BYTES): Define.
(MAX_MEM_FOR_RS_ALIGN_CODE): Define in terms of
MAX_MEM_ALIGNMENT_BYTES.
* config/tc-arm.c (arm_frag_align_code): Replace hard coded
constant with MAX_MEM_FOR_RS_ALIGN_CODE.
* gas/arm/align64.s: New test case.
* gas/arm/align64.d: Expected disassembly.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/config/tc-arm.h | 3 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/align64.d | 69 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/align64.s | 12 |
5 files changed, 96 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index bf7dc29..63a654d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2009-07-14 Daniel Gutson <dgutson@codesourcery.com> + + * config/tc-arm.h (MAX_MEM_ALIGNMENT_BYTES): Define. + (MAX_MEM_FOR_RS_ALIGN_CODE): Define in terms of + MAX_MEM_ALIGNMENT_BYTES. + * config/tc-arm.c (arm_frag_align_code): Replace hard coded + constant with MAX_MEM_FOR_RS_ALIGN_CODE. + 2009-07-14 Nick Clifton <nickc@redhat.com> PR 10387 diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h index 47fce80..53ca895 100644 --- a/gas/config/tc-arm.h +++ b/gas/config/tc-arm.h @@ -193,7 +193,8 @@ void arm_copy_symbol_attributes (symbolS *, symbolS *); #define TC_CONS_FIX_NEW cons_fix_new_arm -#define MAX_MEM_FOR_RS_ALIGN_CODE 31 +#define MAX_MEM_ALIGNMENT_BYTES 6 +#define MAX_MEM_FOR_RS_ALIGN_CODE ((1 << MAX_MEM_ALIGNMENT_BYTES) - 1) /* For frags in code sections we need to record whether they contain ARM code or THUMB code. This is that if they have to be aligned, diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 94af320..caf8eab 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2009-07-14 Daniel Gutson <dgutson@codesourcery.com> + * gas/arm/align64.s: New test case. + * gas/arm/align64.d: Expected disassembly. + +2009-07-14 Daniel Gutson <dgutson@codesourcery.com> + * gas/arm/thumb-w-bad.d: New test case. * gas/arm/thumb-w-bad.l: New file. * gas/arm/thumb-w-bad.s: New file. diff --git a/gas/testsuite/gas/arm/align64.d b/gas/testsuite/gas/arm/align64.d new file mode 100644 index 0000000..cee7442 --- /dev/null +++ b/gas/testsuite/gas/arm/align64.d @@ -0,0 +1,69 @@ +# name: 64 Bytes alignment test +# objdump: -dr --prefix-addresses --show-raw-insn + +.*: +file format .*arm.* + +Disassembly of section .text: +00000000 <foo> f04f 0001.*mov.w.*r0, #1 +00000004 <foo\+0x4> 46c0.*nop.* +00000006 <foo\+0x6> 46c0.*nop.* +00000008 <foo\+0x8> 46c0.*nop.* +0000000a <foo\+0xa> 46c0.*nop.* +0000000c <foo\+0xc> 46c0.*nop.* +0000000e <foo\+0xe> 46c0.*nop.* +00000010 <foo\+0x10> 46c0.*nop.* +00000012 <foo\+0x12> 46c0.*nop.* +00000014 <foo\+0x14> 46c0.*nop.* +00000016 <foo\+0x16> 46c0.*nop.* +00000018 <foo\+0x18> 46c0.*nop.* +0000001a <foo\+0x1a> 46c0.*nop.* +0000001c <foo\+0x1c> 46c0.*nop.* +0000001e <foo\+0x1e> 46c0.*nop.* +00000020 <foo\+0x20> 46c0.*nop.* +00000022 <foo\+0x22> 46c0.*nop.* +00000024 <foo\+0x24> 46c0.*nop.* +00000026 <foo\+0x26> 46c0.*nop.* +00000028 <foo\+0x28> 46c0.*nop.* +0000002a <foo\+0x2a> 46c0.*nop.* +0000002c <foo\+0x2c> 46c0.*nop.* +0000002e <foo\+0x2e> 46c0.*nop.* +00000030 <foo\+0x30> 46c0.*nop.* +00000032 <foo\+0x32> 46c0.*nop.* +00000034 <foo\+0x34> 46c0.*nop.* +00000036 <foo\+0x36> 46c0.*nop.* +00000038 <foo\+0x38> 46c0.*nop.* +0000003a <foo\+0x3a> 46c0.*nop.* +0000003c <foo\+0x3c> 46c0.*nop.* +0000003e <foo\+0x3e> 46c0.*nop.* +00000040 <foo\+0x40> f04f 0002.*mov.w.*r0, #2 +00000044 <foo2> e3a00003.*mov.*r0, #3 +00000048 <foo2\+0x4> e1a00000.*nop.* +0000004c <foo2\+0x8> e1a00000.*nop.* +00000050 <foo2\+0xc> e1a00000.*nop.* +00000054 <foo2\+0x10> e1a00000.*nop.* +00000058 <foo2\+0x14> e1a00000.*nop.* +0000005c <foo2\+0x18> e1a00000.*nop.* +00000060 <foo2\+0x1c> e1a00000.*nop.* +00000064 <foo2\+0x20> e1a00000.*nop.* +00000068 <foo2\+0x24> e1a00000.*nop.* +0000006c <foo2\+0x28> e1a00000.*nop.* +00000070 <foo2\+0x2c> e1a00000.*nop.* +00000074 <foo2\+0x30> e1a00000.*nop.* +00000078 <foo2\+0x34> e1a00000.*nop.* +0000007c <foo2\+0x38> e1a00000.*nop.* +00000080 <foo2\+0x3c> e3a00004.*mov.*r0, #4 +00000084 <foo2\+0x40> e1a00000.*nop.* +00000088 <foo2\+0x44> e1a00000.*nop.* +0000008c <foo2\+0x48> e1a00000.*nop.* +00000090 <foo2\+0x4c> e1a00000.*nop.* +00000094 <foo2\+0x50> e1a00000.*nop.* +00000098 <foo2\+0x54> e1a00000.*nop.* +0000009c <foo2\+0x58> e1a00000.*nop.* +000000a0 <foo2\+0x5c> e1a00000.*nop.* +000000a4 <foo2\+0x60> e1a00000.*nop.* +000000a8 <foo2\+0x64> e1a00000.*nop.* +000000ac <foo2\+0x68> e1a00000.*nop.* +000000b0 <foo2\+0x6c> e1a00000.*nop.* +000000b4 <foo2\+0x70> e1a00000.*nop.* +000000b8 <foo2\+0x74> e1a00000.*nop.* +000000bc <foo2\+0x78> e1a00000.*nop.* diff --git a/gas/testsuite/gas/arm/align64.s b/gas/testsuite/gas/arm/align64.s new file mode 100644 index 0000000..1713561 --- /dev/null +++ b/gas/testsuite/gas/arm/align64.s @@ -0,0 +1,12 @@ +.syntax unified +.thumb +foo: + mov r0, #1 +.p2align 6,,63 + mov r0, #2 + +.arm +foo2: + mov r0, #3 +.p2align 6,,63 + mov r0, #4 |