From 36fb0b86c7e8f233a94e606f0a94355c17085b50 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 4 Feb 1998 20:42:29 +0000 Subject: [PATCH] Wed Feb 4 15:40:00 1998 Geoffrey Keating * gas/ppc/ppc.exp: New file. * gas/ppc/astest.s, gas/ppc/astest.d: New test. * gas/ppc/astest2.s, gas/ppc/astest2.d: New test. --- gas/testsuite/ChangeLog | 6 +++ gas/testsuite/gas/.Sanitize | 1 + gas/testsuite/gas/ppc/.Sanitize | 36 ++++++++++++++++ gas/testsuite/gas/ppc/astest.d | 74 ++++++++++++++++++++++++++++++++ gas/testsuite/gas/ppc/astest.s | 52 +++++++++++++++++++++++ gas/testsuite/gas/ppc/astest2.d | 75 +++++++++++++++++++++++++++++++++ gas/testsuite/gas/ppc/astest2.s | 52 +++++++++++++++++++++++ 7 files changed, 296 insertions(+) create mode 100644 gas/testsuite/gas/ppc/.Sanitize create mode 100644 gas/testsuite/gas/ppc/astest.d create mode 100644 gas/testsuite/gas/ppc/astest.s create mode 100644 gas/testsuite/gas/ppc/astest2.d create mode 100644 gas/testsuite/gas/ppc/astest2.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index faff7e11687..586bc3ac527 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +Wed Feb 4 15:40:00 1998 Geoffrey Keating + + * gas/ppc/ppc.exp: New file. + * gas/ppc/astest.s, gas/ppc/astest.d: New test. + * gas/ppc/astest2.s, gas/ppc/astest2.d: New test. + Sun Feb 1 21:43:54 1998 Jeffrey A Law (law@cygnus.com) * gas/mips/4010.s: Pad test code out to a 16byte boundary. diff --git a/gas/testsuite/gas/.Sanitize b/gas/testsuite/gas/.Sanitize index 74c0ac4143a..e3202d4635a 100644 --- a/gas/testsuite/gas/.Sanitize +++ b/gas/testsuite/gas/.Sanitize @@ -66,6 +66,7 @@ mips mn10200 mn10300 mri +ppc sh sparc sparc-solaris diff --git a/gas/testsuite/gas/ppc/.Sanitize b/gas/testsuite/gas/ppc/.Sanitize new file mode 100644 index 00000000000..1c8f3d43484 --- /dev/null +++ b/gas/testsuite/gas/ppc/.Sanitize @@ -0,0 +1,36 @@ +# .Sanitize for devo/gas/testsuite/gas/ppc. + +# Each directory to survive it's way into a release will need a file +# like this one called "./.Sanitize". All keyword lines must exist, +# and must exist in the order specified by this file. Each directory +# in the tree will be processed, top down, in the following order. + +# Hash started lines like this one are comments and will be deleted +# before anything else is done. Blank lines will also be squashed +# out. + +# The lines between the "Do-first:" line and the "Things-to-keep:" +# line are executed as a /bin/sh shell script before anything else is +# done in this + +Do-first: + +# All files listed between the "Things-to-keep:" line and the +# "Files-to-sed:" line will be kept. All other files will be removed. +# Directories listed in this section will have their own Sanitize +# called. Directories not listed will be removed in their entirety +# with rm -rf. + +Things-to-keep: + +astest.d +astest.s +astest2.d +astest2.s +ppc.exp + +Things-to-lose: + +Do-last: + +# End of file. diff --git a/gas/testsuite/gas/ppc/astest.d b/gas/testsuite/gas/ppc/astest.d new file mode 100644 index 00000000000..5a2f1cd5e92 --- /dev/null +++ b/gas/testsuite/gas/ppc/astest.d @@ -0,0 +1,74 @@ +#objdump: -Dr +#name: PowerPC test 1 + +.*: +file format elf32-powerpc + +Disassembly of section \.text: + +00000000 : + 0: 60 00 00 00 nop + 4: 60 00 00 00 nop + 8: 60 00 00 00 nop + +0000000c : + c: 48 00 00 04 b 10 + +00000010 : + 10: 48 00 00 08 b 18 + 14: 48 00 00 00 b 14 + 14: R_PPC_REL24 x + 18: 48 00 00 04 b 1c + 18: R_PPC_REL24 \.data\+0x4 + 1c: 48 00 00 00 b 1c + 1c: R_PPC_REL24 z + 20: 48 00 00 14 b 34 + 20: R_PPC_REL24 z\+0x14 + 24: 48 00 00 04 b 28 + 28: 48 00 00 00 b 28 + 28: R_PPC_REL24 a + 2c: 4b ff ff e4 b 10 + 30: 48 00 00 04 b 34 + 30: R_PPC_REL24 a\+0x4 + 34: 4b ff ff e0 b 14 + 38: 48 00 00 00 b 38 + 38: R_PPC_LOCAL24PC a + 3c: 4b ff ff d4 b 10 + + 40: 00 00 00 40 \.long 0x40 + 40: R_PPC_ADDR32 \.text\+0x40 + + 44: 00 00 00 4c \.long 0x4c + 44: R_PPC_ADDR32 \.text\+0x4c + 48: 00 00 00 00 \.long 0x0 + 48: R_PPC_REL32 x + 4c: 00 00 00 04 \.long 0x4 + 4c: R_PPC_REL32 x\+0x4 + \.\.\. + 50: R_PPC_REL32 z + 54: R_PPC_REL32 y + 58: R_PPC_ADDR32 x + 5c: R_PPC_ADDR32 y + 60: R_PPC_ADDR32 z + 64: ff ff ff fc fnmsub f31,f31,f31,f31 + 64: R_PPC_ADDR32 x\+0xfffffffc + 68: ff ff ff fc fnmsub f31,f31,f31,f31 + 68: R_PPC_ADDR32 y\+0xfffffffc + 6c: ff ff ff fc fnmsub f31,f31,f31,f31 + 6c: R_PPC_ADDR32 z\+0xfffffffc + 70: ff ff ff 9c \.long 0xffffff9c + 74: ff ff ff 9c \.long 0xffffff9c + \.\.\. + 78: R_PPC_ADDR32 a + 7c: R_PPC_ADDR32 b + 80: R_PPC_ADDR32 apfour + 84: ff ff ff fc fnmsub f31,f31,f31,f31 + 88: 00 00 00 02 \.long 0x2 + 88: R_PPC_ADDR32 apfour\+0x2 + 8c: 00 00 00 00 \.long 0x0 +Disassembly of section \.data: + +00000000 : + 0: 00 00 00 00 \.long 0x0 + +00000004 : + 4: 00 00 00 00 \.long 0x0 diff --git a/gas/testsuite/gas/ppc/astest.s b/gas/testsuite/gas/ppc/astest.s new file mode 100644 index 00000000000..f1af216313c --- /dev/null +++ b/gas/testsuite/gas/ppc/astest.s @@ -0,0 +1,52 @@ + .section ".data" + .globl x + .globl z +x: .long 0 +z = . + 4 +four = z - x - 4 +y: .long 0 + + .section ".text" +foo: + nop ; nop ; nop + .globl a +a: b .+4 +b: b .+8 + b x + b y + b z + b z+20 + b .+four + b a + b b + b a+4 + b b+4 + b a@local + b b@local + .long . + .long .+8 + .long x-. + .long x+4-. + .long z-. + .long y-. + .long x + .long y + .long z + .long x-four + .long y-four + .long z-four + .long a-. + .long b-. + .long a + .long b + +apfour = a + four + .long apfour + .long a-apfour + .long apfour+2 + .long apfour-b + + .type foo,@function + .type a,@function + .type b,@function + .type apfour,@function diff --git a/gas/testsuite/gas/ppc/astest2.d b/gas/testsuite/gas/ppc/astest2.d new file mode 100644 index 00000000000..c29200ce426 --- /dev/null +++ b/gas/testsuite/gas/ppc/astest2.d @@ -0,0 +1,75 @@ +#objdump: -Dr +#name: PowerPC test 2 + +.*: +file format elf32-powerpc + +Disassembly of section .text: + +00000000 : + 0: 60 00 00 00 nop + 4: 60 00 00 00 nop + 8: 60 00 00 00 nop + c: 48 00 00 04 b 10 + 10: 48 00 00 08 b 18 + 14: 48 00 00 00 b 14 + 14: R_PPC_REL24 x + 18: 48 00 00 04 b 1c + 18: R_PPC_REL24 .data\+0x4 + 1c: 48 00 00 00 b 1c + 1c: R_PPC_REL24 z + 20: 48 00 00 14 b 34 + 20: R_PPC_REL24 z\+0x14 + 24: 48 00 00 04 b 28 + 28: 48 00 00 00 b 28 + 28: R_PPC_REL24 a + 2c: 48 00 00 50 b 7c + 30: 48 00 00 04 b 34 + 30: R_PPC_REL24 a\+0x4 + 34: 48 00 00 4c b 80 + 38: 48 00 00 00 b 38 + 38: R_PPC_LOCAL24PC a + 3c: 48 00 00 40 b 7c + + 40: 00 00 00 40 .long 0x40 + 40: R_PPC_ADDR32 .text\+0x40 + + 44: 00 00 00 4c .long 0x4c + 44: R_PPC_ADDR32 .text\+0x4c + 48: 00 00 00 00 .long 0x0 + 48: R_PPC_REL32 x + 4c: 00 00 00 04 .long 0x4 + 4c: R_PPC_REL32 x\+0x4 + ... + 50: R_PPC_REL32 z + 54: R_PPC_REL32 y + 58: R_PPC_ADDR32 x + 5c: R_PPC_ADDR32 y + 60: R_PPC_ADDR32 z + 64: ff ff ff fc fnmsub f31,f31,f31,f31 + 64: R_PPC_ADDR32 x\+0xfffffffc + 68: ff ff ff fc fnmsub f31,f31,f31,f31 + 68: R_PPC_ADDR32 y\+0xfffffffc + 6c: ff ff ff fc fnmsub f31,f31,f31,f31 + 6c: R_PPC_ADDR32 z\+0xfffffffc + 70: 00 00 00 08 .long 0x8 + 74: 00 00 00 08 .long 0x8 + +00000078 : + 78: 00 00 00 00 .long 0x0 + 78: R_PPC_ADDR32 a + +0000007c : + ... + 7c: R_PPC_ADDR32 b + 80: R_PPC_ADDR32 apfour + 84: ff ff ff fc fnmsub f31,f31,f31,f31 + 88: 00 00 00 02 .long 0x2 + 88: R_PPC_ADDR32 apfour\+0x2 + 8c: 00 00 00 00 .long 0x0 +Disassembly of section .data: + +00000000 : + 0: 00 00 00 00 .long 0x0 + +00000004 : + 4: 00 00 00 00 .long 0x0 diff --git a/gas/testsuite/gas/ppc/astest2.s b/gas/testsuite/gas/ppc/astest2.s new file mode 100644 index 00000000000..5af223378fd --- /dev/null +++ b/gas/testsuite/gas/ppc/astest2.s @@ -0,0 +1,52 @@ +four = 4 + .section ".text" +foo: + nop ; nop ; nop + .globl a + b .+4 + b .+8 + b x + b y + b z + b z+20 + b .+four + b a + b b + b a+4 + b b+4 + b a@local + b b@local + .long . + .long .+8 + .long x-. + .long x+4-. + .long z-. + .long y-. + .long x + .long y + .long z + .long x-four + .long y-four + .long z-four + .long a-. + .long b-. +a: .long a +b: .long b + +apfour = a + four + .long apfour + .long a-apfour + .long apfour+2 + .long apfour-b + + .section ".data" + .globl x + .globl z +x: .long 0 +z = . + 4 +y: .long 0 + + .type foo,@function + .type a,@function + .type b,@function + .type apfour,@function -- 2.30.2