diff options
author | Jan Beulich <jbeulich@novell.com> | 2008-02-13 10:14:40 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2008-02-13 10:14:40 +0000 |
commit | a60de03c6170ebd45927e318164e2306028df86d (patch) | |
tree | 1ffc652acac063787cee604d31310ea6542f0600 /gas/testsuite | |
parent | 36af4ef67677fb266a52888d48fd85d7f889c050 (diff) | |
download | gdb-a60de03c6170ebd45927e318164e2306028df86d.zip gdb-a60de03c6170ebd45927e318164e2306028df86d.tar.gz gdb-a60de03c6170ebd45927e318164e2306028df86d.tar.bz2 |
gas/
2008-02-13 Jan Beulich <jbeulich@novell.com>
* config/tc-i386.c (allow_pseudo_reg): New.
(parse_real_register): Check for NULL just once. Allow all
register table entries when allow_pseudo_reg is non-zero.
Don't allow any registers without type when allow_pseudo_reg
is zero.
(tc_x86_regname_to_dw2regnum): Replace with ...
(tc_x86_parse_to_dw2regnum): ... this.
(tc_x86_frame_initial_instructions): Adjust for above change.
* config/tc-i386.h (tc_regname_to_dw2regnum): Remove.
(tc_parse_to_dw2regnum): New.
(tc_x86_regname_to_dw2regnum): Replace with ...
(tc_x86_parse_to_dw2regnum): ... this.
* dw2gencfi.c (tc_parse_to_dw2regnum): New, broken out of ...
(cfi_parse_reg): ... this. Use tc_parse_to_dw2regnum. Adjust
error handling.
gas/testsuite/
2008-02-13 Jan Beulich <jbeulich@novell.com>
* gas/cfi/cfi-i386.s: Add code testing use of all registers.
Fix a few comments.
* gas/cfi/cfi-x86_64.s: Likewise.
* gas/cfi/cfi-i386.d, gas/cfi/cfi-x86_64.d: Adjust.
opcodes/
2008-02-13 Jan Beulich <jbeulich@novell.com>
* i386-gen.c (process_i386_registers): Process new fields.
* i386-opc.h (reg_entry): Shrink reg_flags and reg_num to
unsigned char. Add dw2_regnum and Dw2Inval.
* i386-reg.tbl: Provide initializers for dw2_regnum. Add pseudo
register names.
* i386-tbl.h: Re-generate.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-i386.d | 104 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-i386.s | 68 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-x86_64.d | 140 | ||||
-rw-r--r-- | gas/testsuite/gas/cfi/cfi-x86_64.s | 80 |
5 files changed, 391 insertions, 8 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 9ab45eb..846dc0e 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2008-02-13 Jan Beulich <jbeulich@novell.com> + + * gas/cfi/cfi-i386.s: Add code testing use of all registers. + Fix a few comments. + * gas/cfi/cfi-x86_64.s: Likewise. + * gas/cfi/cfi-i386.d, gas/cfi/cfi-x86_64.d: Adjust. + 2002-02-12 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/i386.exp: Run x86-64-arch-2 instead of diff --git a/gas/testsuite/gas/cfi/cfi-i386.d b/gas/testsuite/gas/cfi/cfi-i386.d index ac085e9..ef477d3 100644 --- a/gas/testsuite/gas/cfi/cfi-i386.d +++ b/gas/testsuite/gas/cfi/cfi-i386.d @@ -46,3 +46,107 @@ The section .eh_frame contains: DW_CFA_nop DW_CFA_nop +0000008c 00000010 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -4 + Return address column: 8 + Augmentation data: 1b + + DW_CFA_undefined: r8 \(eip\) + DW_CFA_nop + +000000a0 00000094 00000018 FDE cie=0000008c pc=00000044..00000071 + DW_CFA_advance_loc: 1 to 00000045 + DW_CFA_undefined: r0 \(eax\) + DW_CFA_advance_loc: 1 to 00000046 + DW_CFA_undefined: r1 \(ecx\) + DW_CFA_advance_loc: 1 to 00000047 + DW_CFA_undefined: r2 \(edx\) + DW_CFA_advance_loc: 1 to 00000048 + DW_CFA_undefined: r3 \(ebx\) + DW_CFA_advance_loc: 1 to 00000049 + DW_CFA_undefined: r4 \(esp\) + DW_CFA_advance_loc: 1 to 0000004a + DW_CFA_undefined: r5 \(ebp\) + DW_CFA_advance_loc: 1 to 0000004b + DW_CFA_undefined: r6 \(esi\) + DW_CFA_advance_loc: 1 to 0000004c + DW_CFA_undefined: r7 \(edi\) + DW_CFA_advance_loc: 1 to 0000004d + DW_CFA_undefined: r9 \(eflags\) + DW_CFA_advance_loc: 1 to 0000004e + DW_CFA_undefined: r40 \(es\) + DW_CFA_advance_loc: 1 to 0000004f + DW_CFA_undefined: r41 \(cs\) + DW_CFA_advance_loc: 1 to 00000050 + DW_CFA_undefined: r43 \(ds\) + DW_CFA_advance_loc: 1 to 00000051 + DW_CFA_undefined: r42 \(ss\) + DW_CFA_advance_loc: 1 to 00000052 + DW_CFA_undefined: r44 \(fs\) + DW_CFA_advance_loc: 1 to 00000053 + DW_CFA_undefined: r45 \(gs\) + DW_CFA_advance_loc: 1 to 00000054 + DW_CFA_undefined: r48 \(tr\) + DW_CFA_advance_loc: 1 to 00000055 + DW_CFA_undefined: r49 \(ldtr\) + DW_CFA_advance_loc: 1 to 00000056 + DW_CFA_undefined: r39 \(mxcsr\) + DW_CFA_advance_loc: 1 to 00000057 + DW_CFA_undefined: r21 \(xmm0\) + DW_CFA_advance_loc: 1 to 00000058 + DW_CFA_undefined: r22 \(xmm1\) + DW_CFA_advance_loc: 1 to 00000059 + DW_CFA_undefined: r23 \(xmm2\) + DW_CFA_advance_loc: 1 to 0000005a + DW_CFA_undefined: r24 \(xmm3\) + DW_CFA_advance_loc: 1 to 0000005b + DW_CFA_undefined: r25 \(xmm4\) + DW_CFA_advance_loc: 1 to 0000005c + DW_CFA_undefined: r26 \(xmm5\) + DW_CFA_advance_loc: 1 to 0000005d + DW_CFA_undefined: r27 \(xmm6\) + DW_CFA_advance_loc: 1 to 0000005e + DW_CFA_undefined: r28 \(xmm7\) + DW_CFA_advance_loc: 1 to 0000005f + DW_CFA_undefined: r37 \(fcw\) + DW_CFA_advance_loc: 1 to 00000060 + DW_CFA_undefined: r38 \(fsw\) + DW_CFA_advance_loc: 1 to 00000061 + DW_CFA_undefined: r11 \(st\(?0?\)?\) + DW_CFA_advance_loc: 1 to 00000062 + DW_CFA_undefined: r12 \(st\(?1\)?\) + DW_CFA_advance_loc: 1 to 00000063 + DW_CFA_undefined: r13 \(st\(?2\)?\) + DW_CFA_advance_loc: 1 to 00000064 + DW_CFA_undefined: r14 \(st\(?3\)?\) + DW_CFA_advance_loc: 1 to 00000065 + DW_CFA_undefined: r15 \(st\(?4\)?\) + DW_CFA_advance_loc: 1 to 00000066 + DW_CFA_undefined: r16 \(st\(?5\)?\) + DW_CFA_advance_loc: 1 to 00000067 + DW_CFA_undefined: r17 \(st\(?6\)?\) + DW_CFA_advance_loc: 1 to 00000068 + DW_CFA_undefined: r18 \(st\(?7\)?\) + DW_CFA_advance_loc: 1 to 00000069 + DW_CFA_undefined: r29 \(mm0\) + DW_CFA_advance_loc: 1 to 0000006a + DW_CFA_undefined: r30 \(mm1\) + DW_CFA_advance_loc: 1 to 0000006b + DW_CFA_undefined: r31 \(mm2\) + DW_CFA_advance_loc: 1 to 0000006c + DW_CFA_undefined: r32 \(mm3\) + DW_CFA_advance_loc: 1 to 0000006d + DW_CFA_undefined: r33 \(mm4\) + DW_CFA_advance_loc: 1 to 0000006e + DW_CFA_undefined: r34 \(mm5\) + DW_CFA_advance_loc: 1 to 0000006f + DW_CFA_undefined: r35 \(mm6\) + DW_CFA_advance_loc: 1 to 00000070 + DW_CFA_undefined: r36 \(mm7\) + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + diff --git a/gas/testsuite/gas/cfi/cfi-i386.s b/gas/testsuite/gas/cfi/cfi-i386.s index afaafab..9da0db1 100644 --- a/gas/testsuite/gas/cfi/cfi-i386.s +++ b/gas/testsuite/gas/cfi/cfi-i386.s @@ -1,5 +1,3 @@ -#; $ as -o test.o gas-cfi-test.s && gcc -nostdlib -o test test.o - .text #; func_locvars @@ -52,7 +50,7 @@ func_prologue: #; func_otherreg #; - function that moves frame pointer to -#; another register (r12) and then allocates +#; another register (ebx) and then allocates #; a space for local variables .type func_otherreg,@function @@ -65,14 +63,14 @@ func_otherreg: #; alocate space for local vars #; (no .cfi_{def,adjust}_cfa_offset here, - #; because CFA is computed from r12!) + #; because CFA is computed from ebx!) sub $100,%esp #; function body call func_prologue add $2, %eax - #; restore frame pointer from r12 + #; restore frame pointer from ebx mov %ebx,%esp .cfi_def_cfa esp,4 ret @@ -105,3 +103,63 @@ _start: int $0x80 hlt .cfi_endproc + +#; func_all_registers +#; - test for all .cfi register numbers. +#; This function is never called and the CFI info doesn't make sense. + + .type func_all_registers,@function +func_all_registers: + .cfi_startproc simple + + .cfi_undefined eip ; nop + .cfi_undefined eax ; nop + .cfi_undefined ecx ; nop + .cfi_undefined edx ; nop + .cfi_undefined ebx ; nop + .cfi_undefined esp ; nop + .cfi_undefined ebp ; nop + .cfi_undefined esi ; nop + .cfi_undefined edi ; nop + .cfi_undefined eflags ; nop + + .cfi_undefined es ; nop + .cfi_undefined cs ; nop + .cfi_undefined ds ; nop + .cfi_undefined ss ; nop + .cfi_undefined fs ; nop + .cfi_undefined gs ; nop + .cfi_undefined tr ; nop + .cfi_undefined ldtr ; nop + + .cfi_undefined mxcsr ; nop + .cfi_undefined xmm0 ; nop + .cfi_undefined xmm1 ; nop + .cfi_undefined xmm2 ; nop + .cfi_undefined xmm3 ; nop + .cfi_undefined xmm4 ; nop + .cfi_undefined xmm5 ; nop + .cfi_undefined xmm6 ; nop + .cfi_undefined xmm7 ; nop + + .cfi_undefined fcw ; nop + .cfi_undefined fsw ; nop + .cfi_undefined st ; nop + .cfi_undefined st(1) ; nop + .cfi_undefined st(2) ; nop + .cfi_undefined st(3) ; nop + .cfi_undefined st(4) ; nop + .cfi_undefined st(5) ; nop + .cfi_undefined st(6) ; nop + .cfi_undefined st(7) ; nop + + .cfi_undefined mm0 ; nop + .cfi_undefined mm1 ; nop + .cfi_undefined mm2 ; nop + .cfi_undefined mm3 ; nop + .cfi_undefined mm4 ; nop + .cfi_undefined mm5 ; nop + .cfi_undefined mm6 ; nop + .cfi_undefined mm7 ; nop + + .cfi_endproc diff --git a/gas/testsuite/gas/cfi/cfi-x86_64.d b/gas/testsuite/gas/cfi/cfi-x86_64.d index 9b6795c..3fc7d53 100644 --- a/gas/testsuite/gas/cfi/cfi-x86_64.d +++ b/gas/testsuite/gas/cfi/cfi-x86_64.d @@ -60,7 +60,7 @@ The section .eh_frame contains: DW_CFA_def_cfa: r7 \(rsp\) ofs 8 -000000a4 00000030 00000018 FDE cie=00000090 pc=0000004d..00000058 +000000a4 0000002c 00000018 FDE cie=00000090 pc=0000004d..00000058 DW_CFA_advance_loc: 1 to 0000004e DW_CFA_def_cfa_offset: 16 DW_CFA_advance_loc: 1 to 0000004f @@ -82,6 +82,144 @@ The section .eh_frame contains: DW_CFA_advance_loc: 1 to 00000057 DW_CFA_restore_state DW_CFA_nop + +000000d4 00000010 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -8 + Return address column: 16 + Augmentation data: 1b + + DW_CFA_undefined: r16 \(rip\) + DW_CFA_nop + +000000e8 000000cc 00000018 FDE cie=000000d4 pc=00000058..00000097 + DW_CFA_advance_loc: 1 to 00000059 + DW_CFA_undefined: r0 \(rax\) + DW_CFA_advance_loc: 1 to 0000005a + DW_CFA_undefined: r2 \(rcx\) + DW_CFA_advance_loc: 1 to 0000005b + DW_CFA_undefined: r1 \(rdx\) + DW_CFA_advance_loc: 1 to 0000005c + DW_CFA_undefined: r3 \(rbx\) + DW_CFA_advance_loc: 1 to 0000005d + DW_CFA_undefined: r7 \(rsp\) + DW_CFA_advance_loc: 1 to 0000005e + DW_CFA_undefined: r6 \(rbp\) + DW_CFA_advance_loc: 1 to 0000005f + DW_CFA_undefined: r4 \(rsi\) + DW_CFA_advance_loc: 1 to 00000060 + DW_CFA_undefined: r5 \(rdi\) + DW_CFA_advance_loc: 1 to 00000061 + DW_CFA_undefined: r8 \(r8\) + DW_CFA_advance_loc: 1 to 00000062 + DW_CFA_undefined: r9 \(r9\) + DW_CFA_advance_loc: 1 to 00000063 + DW_CFA_undefined: r10 \(r10\) + DW_CFA_advance_loc: 1 to 00000064 + DW_CFA_undefined: r11 \(r11\) + DW_CFA_advance_loc: 1 to 00000065 + DW_CFA_undefined: r12 \(r12\) + DW_CFA_advance_loc: 1 to 00000066 + DW_CFA_undefined: r13 \(r13\) + DW_CFA_advance_loc: 1 to 00000067 + DW_CFA_undefined: r14 \(r14\) + DW_CFA_advance_loc: 1 to 00000068 + DW_CFA_undefined: r15 \(r15\) + DW_CFA_advance_loc: 1 to 00000069 + DW_CFA_undefined: r49 \([er]flags\) + DW_CFA_advance_loc: 1 to 0000006a + DW_CFA_undefined: r50 \(es\) + DW_CFA_advance_loc: 1 to 0000006b + DW_CFA_undefined: r51 \(cs\) + DW_CFA_advance_loc: 1 to 0000006c + DW_CFA_undefined: r53 \(ds\) + DW_CFA_advance_loc: 1 to 0000006d + DW_CFA_undefined: r52 \(ss\) + DW_CFA_advance_loc: 1 to 0000006e + DW_CFA_undefined: r54 \(fs\) + DW_CFA_advance_loc: 1 to 0000006f + DW_CFA_undefined: r55 \(gs\) + DW_CFA_advance_loc: 1 to 00000070 + DW_CFA_undefined: r62 \(tr\) + DW_CFA_advance_loc: 1 to 00000071 + DW_CFA_undefined: r63 \(ldtr\) + DW_CFA_advance_loc: 1 to 00000072 + DW_CFA_undefined: r58 \(fs\.base\) + DW_CFA_advance_loc: 1 to 00000073 + DW_CFA_undefined: r59 \(gs\.base\) + DW_CFA_advance_loc: 1 to 00000074 + DW_CFA_undefined: r64 \(mxcsr\) + DW_CFA_advance_loc: 1 to 00000075 + DW_CFA_undefined: r17 \(xmm0\) + DW_CFA_advance_loc: 1 to 00000076 + DW_CFA_undefined: r18 \(xmm1\) + DW_CFA_advance_loc: 1 to 00000077 + DW_CFA_undefined: r19 \(xmm2\) + DW_CFA_advance_loc: 1 to 00000078 + DW_CFA_undefined: r20 \(xmm3\) + DW_CFA_advance_loc: 1 to 00000079 + DW_CFA_undefined: r21 \(xmm4\) + DW_CFA_advance_loc: 1 to 0000007a + DW_CFA_undefined: r22 \(xmm5\) + DW_CFA_advance_loc: 1 to 0000007b + DW_CFA_undefined: r23 \(xmm6\) + DW_CFA_advance_loc: 1 to 0000007c + DW_CFA_undefined: r24 \(xmm7\) + DW_CFA_advance_loc: 1 to 0000007d + DW_CFA_undefined: r25 \(xmm8\) + DW_CFA_advance_loc: 1 to 0000007e + DW_CFA_undefined: r26 \(xmm9\) + DW_CFA_advance_loc: 1 to 0000007f + DW_CFA_undefined: r27 \(xmm10\) + DW_CFA_advance_loc: 1 to 00000080 + DW_CFA_undefined: r28 \(xmm11\) + DW_CFA_advance_loc: 1 to 00000081 + DW_CFA_undefined: r29 \(xmm12\) + DW_CFA_advance_loc: 1 to 00000082 + DW_CFA_undefined: r30 \(xmm13\) + DW_CFA_advance_loc: 1 to 00000083 + DW_CFA_undefined: r31 \(xmm14\) + DW_CFA_advance_loc: 1 to 00000084 + DW_CFA_undefined: r32 \(xmm15\) + DW_CFA_advance_loc: 1 to 00000085 + DW_CFA_undefined: r65 \(fcw\) + DW_CFA_advance_loc: 1 to 00000086 + DW_CFA_undefined: r66 \(fsw\) + DW_CFA_advance_loc: 1 to 00000087 + DW_CFA_undefined: r33 \(st\(?0?\)?\) + DW_CFA_advance_loc: 1 to 00000088 + DW_CFA_undefined: r34 \(st\(?1\)?\) + DW_CFA_advance_loc: 1 to 00000089 + DW_CFA_undefined: r35 \(st\(?2\)?\) + DW_CFA_advance_loc: 1 to 0000008a + DW_CFA_undefined: r36 \(st\(?3\)?\) + DW_CFA_advance_loc: 1 to 0000008b + DW_CFA_undefined: r37 \(st\(?4\)?\) + DW_CFA_advance_loc: 1 to 0000008c + DW_CFA_undefined: r38 \(st\(?5\)?\) + DW_CFA_advance_loc: 1 to 0000008d + DW_CFA_undefined: r39 \(st\(?6\)?\) + DW_CFA_advance_loc: 1 to 0000008e + DW_CFA_undefined: r40 \(st\(?7\)?\) + DW_CFA_advance_loc: 1 to 0000008f + DW_CFA_undefined: r41 \(mm0\) + DW_CFA_advance_loc: 1 to 00000090 + DW_CFA_undefined: r42 \(mm1\) + DW_CFA_advance_loc: 1 to 00000091 + DW_CFA_undefined: r43 \(mm2\) + DW_CFA_advance_loc: 1 to 00000092 + DW_CFA_undefined: r44 \(mm3\) + DW_CFA_advance_loc: 1 to 00000093 + DW_CFA_undefined: r45 \(mm4\) + DW_CFA_advance_loc: 1 to 00000094 + DW_CFA_undefined: r46 \(mm5\) + DW_CFA_advance_loc: 1 to 00000095 + DW_CFA_undefined: r47 \(mm6\) + DW_CFA_advance_loc: 1 to 00000096 + DW_CFA_undefined: r48 \(mm7\) + DW_CFA_nop DW_CFA_nop DW_CFA_nop DW_CFA_nop diff --git a/gas/testsuite/gas/cfi/cfi-x86_64.s b/gas/testsuite/gas/cfi/cfi-x86_64.s index c2e2464..65c2aa2 100644 --- a/gas/testsuite/gas/cfi/cfi-x86_64.s +++ b/gas/testsuite/gas/cfi/cfi-x86_64.s @@ -1,5 +1,3 @@ -#; $ as -o test.o gas-cfi-test.s && gcc -nostdlib -o test test.o - .text #; func_locvars @@ -136,3 +134,81 @@ func_alldirectives: .cfi_restore_state ret .cfi_endproc + +#; func_all_registers +#; - test for all .cfi register numbers. +#; This function is never called and the CFI info doesn't make sense. + + .type func_all_registers,@function +func_all_registers: + .cfi_startproc simple + + .cfi_undefined rip ; nop + .cfi_undefined rax ; nop + .cfi_undefined rcx ; nop + .cfi_undefined rdx ; nop + .cfi_undefined rbx ; nop + .cfi_undefined rsp ; nop + .cfi_undefined rbp ; nop + .cfi_undefined rsi ; nop + .cfi_undefined rdi ; nop + .cfi_undefined r8 ; nop + .cfi_undefined r9 ; nop + .cfi_undefined r10 ; nop + .cfi_undefined r11 ; nop + .cfi_undefined r12 ; nop + .cfi_undefined r13 ; nop + .cfi_undefined r14 ; nop + .cfi_undefined r15 ; nop + .cfi_undefined rflags ; nop + + .cfi_undefined es ; nop + .cfi_undefined cs ; nop + .cfi_undefined ds ; nop + .cfi_undefined ss ; nop + .cfi_undefined fs ; nop + .cfi_undefined gs ; nop + .cfi_undefined tr ; nop + .cfi_undefined ldtr ; nop + .cfi_undefined fs.base ; nop + .cfi_undefined gs.base ; nop + + .cfi_undefined mxcsr ; nop + .cfi_undefined xmm0 ; nop + .cfi_undefined xmm1 ; nop + .cfi_undefined xmm2 ; nop + .cfi_undefined xmm3 ; nop + .cfi_undefined xmm4 ; nop + .cfi_undefined xmm5 ; nop + .cfi_undefined xmm6 ; nop + .cfi_undefined xmm7 ; nop + .cfi_undefined xmm8 ; nop + .cfi_undefined xmm9 ; nop + .cfi_undefined xmm10 ; nop + .cfi_undefined xmm11 ; nop + .cfi_undefined xmm12 ; nop + .cfi_undefined xmm13 ; nop + .cfi_undefined xmm14 ; nop + .cfi_undefined xmm15 ; nop + + .cfi_undefined fcw ; nop + .cfi_undefined fsw ; nop + .cfi_undefined st ; nop + .cfi_undefined st(1) ; nop + .cfi_undefined st(2) ; nop + .cfi_undefined st(3) ; nop + .cfi_undefined st(4) ; nop + .cfi_undefined st(5) ; nop + .cfi_undefined st(6) ; nop + .cfi_undefined st(7) ; nop + + .cfi_undefined mm0 ; nop + .cfi_undefined mm1 ; nop + .cfi_undefined mm2 ; nop + .cfi_undefined mm3 ; nop + .cfi_undefined mm4 ; nop + .cfi_undefined mm5 ; nop + .cfi_undefined mm6 ; nop + .cfi_undefined mm7 ; nop + + .cfi_endproc |