From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15876 invoked by alias); 9 Dec 2004 07:23:22 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 15818 invoked from network); 9 Dec 2004 07:23:16 -0000 Received: from unknown (209.128.65.135) by sourceware.org with QMTP; 9 Dec 2004 07:23:16 -0000 Received: (qmail 8768 invoked by uid 10); 9 Dec 2004 07:23:16 -0000 Received: (qmail 2500 invoked by uid 500); 9 Dec 2004 07:23:08 -0000 Message-ID: <20041209072308.2499.qmail@gossamer.airs.com> Date: Thu, 09 Dec 2004 07:23:00 -0000 From: Ian Lance Taylor To: binutils@sourceware.org Subject: Test case for jal to bal conversion X-SW-Source: 2004-12/txt/msg00089.txt.bz2 Here is a test case for the MIPS linker jal to bal conversion which I just checked in. I will check in this test case shortly. Ian Index: ld-mips-elf/jalbal.d =================================================================== RCS file: ld-mips-elf/jalbal.d diff -N ld-mips-elf/jalbal.d --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ld-mips-elf/jalbal.d 9 Dec 2004 07:12:46 -0000 @@ -0,0 +1,24 @@ +#name: jal to bal +#source: jalbal.s +#as: -EB -n32 -march=rm9000 +#ld: -e s1 -Ttext 0x100000a0 +#objdump: -d + +.*file format elf.*mips.* + +Disassembly of section \.text: + +.* : +.* 0c00802a jal .*100200a8 +.* 00000000 nop +.* 04117fff bal .*100200a8 + +.* : +.* \.\.\. + +.* : +.* 04118000 bal .*100000ac +.* 00000000 nop +.* 0c00002b jal .*100000ac +.* 00000000 nop +.* \.\.\. Index: ld-mips-elf/jalbal.s =================================================================== RCS file: ld-mips-elf/jalbal.s diff -N ld-mips-elf/jalbal.s --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ld-mips-elf/jalbal.s 9 Dec 2004 07:12:46 -0000 @@ -0,0 +1,18 @@ +# Test that jal gets converted to bal on the RM9000 when it is in range. + .text + .global s1 + .type s1,@function + .set noreorder +s1: + jal s3 + nop + jal s3 +s2: + nop + .space 0x1fff8 +s3: + jal s2 + nop + jal s2 + nop + nop Index: ld-mips-elf/mips-elf.exp =================================================================== RCS file: /cvs/src/src/ld/testsuite/ld-mips-elf/mips-elf.exp,v retrieving revision 1.20 diff -u -r1.20 mips-elf.exp --- ld-mips-elf/mips-elf.exp 8 Dec 2004 20:28:08 -0000 1.20 +++ ld-mips-elf/mips-elf.exp 9 Dec 2004 07:12:46 -0000 @@ -81,3 +81,4 @@ } run_dump_test "jaloverflow" +run_dump_test "jalbal"