Re: [RFA] Asm testsuite for x86-64

Michael Snyder
2002-06-05T22:38:35Z

Michal Ludvig wrote:
>
> Hi all,
> This patch adds x86-64 as a supported target for gdb.asm testsuite.
>
> OK to commit?

Blessed. ;-)

>
> 2002-05-06 Michal Ludvig <mludvig@suse.cz>
>
> * gdb.asm/asm-source.exp: Add x86-64 terget.
> * gdb.asm/x86_64.inc: New.
>
> Michal Ludvig
> --
> * SuSE CR, s.r.o * mludvig@suse.cz
> * +420 2 9654 5373 * http://www.suse.cz
>
> ------------------------------------------------------------------------
> Index: asm-source.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v
> retrieving revision 1.24
> diff -c -3 -p -r1.24 asm-source.exp
> *** asm-source.exp 14 May 2002 10:25:32 -0000 1.24
> --- asm-source.exp 5 Jun 2002 12:21:23 -0000
> *************** if [istarget "d10v-*-*"] then {
> *** 47,52 ****
> --- 47,56 ----
> if [istarget "s390-*-*"] then {
> set asm-arch s390
> }
> + if [istarget "x86_64-*-*"] then {
> + set asm-arch x86_64
> + set asm-flags "-gdwarf2 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
> + }
> if [istarget "i\[3456\]86-*-*"] then {
> set asm-arch i386
> }
> Index: x86_64.inc
> ===================================================================
> RCS file: x86_64.inc
> diff -N x86_64.inc
> *** /dev/null 1 Jan 1970 00:00:00 -0000
> --- x86_64.inc 5 Jun 2002 12:21:23 -0000
> ***************
> *** 0 ****
> --- 1,39 ----
> + comment "subroutine prologue"
> + .macro gdbasm_enter
> + push %rbp
> + mov %rsp,%rbp
> + .endm
> +
> + comment "subroutine epilogue"
> + .macro gdbasm_leave
> + pop %rbp
> + ret
> + .endm
> +
> + .macro gdbasm_call subr
> + call \subr
> + .endm
> +
> + .macro gdbasm_several_nops
> + nop
> + nop
> + nop
> + nop
> + .endm
> +
> + comment "exit (0)"
> + .macro gdbasm_exit0
> + hlt
> + .endm
> +
> + comment "crt0 startup"
> + .macro gdbasm_startup
> + xor %rbp, %rbp
> + .endm
> +
> + comment "Declare a data variable"
> + .macro gdbasm_datavar name value
> + .data
> + \name:
> + .long \value
> + .endm