-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow integer immediate for VFP vmov instructions.
This patch fixes the case where you want to use an integer value the floating point immediate to a VFP vmov instruction such as vmovmi.f32 s27, #11. If the immediate is not a float we convert it and copy it's representation into the imm field and then carry on validating as if we originally entered a floating point immediate. The is considered a QoL improvement for hand assembly writers and allows more code portability between assembler. gas/ * gas/config/tc-arm.c (do_neon_mov): Allow integer literal for float immediate. * testsuite/gas/arm/vfp-mov-enc.s: New. * testsuite/gas/arm/vfp-mov-enc.d: New.
- Loading branch information
1 parent
190852c
commit 58ed5c3
Showing
4 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# name: VFP check vmov supports integer immediates | ||
# as: -mcpu=cortex-a8 -mfpu=vfpv3 | ||
# objdump: -dr --prefix-addresses --show-raw-insn | ||
|
||
.*: +file format .*arm.* | ||
|
||
Disassembly of section .text: | ||
0[0-9a-f]+ <[^>]+> 4ef2da06 vmovmi.f32 s27, #38 ; 0x41300000 11.0 | ||
0[0-9a-f]+ <[^>]+> 4ef2da06 vmovmi.f32 s27, #38 ; 0x41300000 11.0 | ||
0[0-9a-f]+ <[^>]+> 4ef7da00 vmovmi.f32 s27, #112 ; 0x3f800000 1.0 | ||
0[0-9a-f]+ <[^>]+> 4ef7da00 vmovmi.f32 s27, #112 ; 0x3f800000 1.0 | ||
0[0-9a-f]+ <[^>]+> cebb1b04 vmovgt.f64 d1, #180 ; 0xc1a00000 -20.0 | ||
0[0-9a-f]+ <[^>]+> ceb81b00 vmovgt.f64 d1, #128 ; 0xc0000000 -2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
VMOVMI.F32 s27,#11 | ||
VMOVMI.F32 s27,#11.0 | ||
VMOVMI.F32 s27,#1 | ||
VMOVMI.F32 s27,#1.0 | ||
VMOVGT.F64 d1,#-20 | ||
VMOVGT.F64 d1,#-2 |