diff options
author | Kaz Kojima <kkojima@rr.iij4u.or.jp> | 2009-08-29 10:38:33 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@rr.iij4u.or.jp> | 2009-08-29 10:38:33 +0000 |
commit | e92108135c40fb69a7a1a66c4f5e4b37406acd0b (patch) | |
tree | 8d141dcf357467363d1eacd42ab70374a014f7e3 /gas/testsuite/gas/sh | |
parent | f5619124fffdf0479ffe397910337ace7c340c0f (diff) | |
download | binutils-redhat-e92108135c40fb69a7a1a66c4f5e4b37406acd0b.tar.gz |
* config/tc-sh.c (md_apply_fix): Extend sign of the offset value
for 64-bit host.
* gas/sh/sign-extension.d: New file.
* gas/sh/sign-extension.s: New file.
* gas/sh/basic.exp: Run new test.
Diffstat (limited to 'gas/testsuite/gas/sh')
-rw-r--r-- | gas/testsuite/gas/sh/basic.exp | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/sh/sign-extension.d | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/sh/sign-extension.s | 3 |
3 files changed, 17 insertions, 1 deletions
diff --git a/gas/testsuite/gas/sh/basic.exp b/gas/testsuite/gas/sh/basic.exp index ffa895216f..ab4e1903a1 100644 --- a/gas/testsuite/gas/sh/basic.exp +++ b/gas/testsuite/gas/sh/basic.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1995, 1996, 1997, 2002, 2003, 2004, 2007 +# Copyright (C) 1995, 1996, 1997, 2002, 2003, 2004, 2007, 2009 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -169,6 +169,8 @@ if [istarget sh*-*-*] then { run_dump_test "reg-prefix" run_dump_test "too_large" + + run_dump_test "sign-extension" } } diff --git a/gas/testsuite/gas/sh/sign-extension.d b/gas/testsuite/gas/sh/sign-extension.d new file mode 100644 index 0000000000..eeae7bddf6 --- /dev/null +++ b/gas/testsuite/gas/sh/sign-extension.d @@ -0,0 +1,11 @@ +#as: -little +#objdump: -drj.text +#name: Sign-extended immediate + +.*: file format .*sh.* + +Disassembly of section \.text: + +00000000 <foo>: + 0: f0 e0 mov #-16,r0 + 2: 09 00 nop diff --git a/gas/testsuite/gas/sh/sign-extension.s b/gas/testsuite/gas/sh/sign-extension.s new file mode 100644 index 0000000000..73d0167941 --- /dev/null +++ b/gas/testsuite/gas/sh/sign-extension.s @@ -0,0 +1,3 @@ + .align 2 +foo: + mov #0xfffffff0, r0 |