Barnaby Wilk s ba85f98c42 This fixes a bug in the ARm assembler where an immediate operand larger than 4 bits (0xF) could be passed to the SMC (Secure Monitor Call) instruction.
For example, this code is invalid:
smc #0x6951

The code would previously check for and encode for up to 16 bit immediate values, however
this immediate should instead be only a 4 bit value
(as documented herehttps://static.docs.arm.com/ddi0406/c/DDI0406C_C_arm_architecture_reference_manual.pdf  ).

Fixed this by adding range checks in the relevant areas and also removing code that would
encode more than the first 4 bits of the immediate (code that is now redundant, as any immediate operand
larger than 0xF would error now anyway).

gas	* config/tc-arm.c (do_smc): Add range check for immediate operand.
	(do_t_smc): Add range check for immediate operand. Remove
	obsolete immediate encoding.
	(md_apply_fix): Fix range check. Remove obsolete immediate encoding.
	* testsuite/gas/arm/arch6zk.d: Fix test.
	* testsuite/gas/arm/arch6zk.s: Fix test.
	* testsuite/gas/arm/smc-bad.d: New test.
	* testsuite/gas/arm/smc-bad.l: New test.
	* testsuite/gas/arm/smc-bad.s: New test.
	* testsuite/gas/arm/thumb32.d: Fix test.
	* testsuite/gas/arm/thumb32.s: Fix test.
2019-06-27 14:06:02 +01:00
..
2019-03-18 22:39:16 +10:30
2019-01-31 14:45:01 +10:30
2019-04-16 17:12:09 +09:30
2019-02-10 04:34:22 -08:00
2019-05-23 19:34:04 +02:00
2019-05-23 19:34:04 +02:00
2019-05-15 16:41:22 +09:30
2019-04-10 13:27:29 +09:30
2019-02-10 04:34:22 -08:00
2019-05-04 17:23:18 +09:30
2019-02-10 04:34:22 -08:00
2019-02-10 04:34:22 -08:00
2019-06-25 16:57:15 +09:30
2019-06-25 13:04:40 +09:30
2019-05-30 15:23:10 -07:00
2019-04-16 17:12:09 +09:30
2019-02-10 04:34:22 -08:00
2019-05-22 08:13:36 +02:00
2019-02-10 04:34:22 -08:00
2019-04-16 17:13:04 +09:30
2019-02-10 04:34:22 -08:00
2019-05-15 16:28:14 +09:30
2019-04-10 13:27:29 +09:30