diff mbox series

[v2,2/2] gas: testsuite: Add microblaze reloc test

Message ID 20231017084007.229397-2-neal.frager@amd.com
State New
Headers show
Series [v2,1/2] bfd: microblaze: Add 32_NONE reloc type | expand

Commit Message

Frager, Neal Oct. 17, 2023, 8:40 a.m. UTC
This patch adds code to the gas/microblaze/reloc_sym.exp
test to verify R_MICROBLAZE_32_NONE relocation type.

Signed-off-by: Neal Frager <neal.frager@amd.com>
---
 gas/testsuite/gas/microblaze/reloc_sym.d     | 5 +++++
 gas/testsuite/gas/microblaze/reloc_weaksym.s | 5 ++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

Comments

Nick Clifton Nov. 10, 2023, 2:28 p.m. UTC | #1
Hi Neal,

> This patch adds code to the gas/microblaze/reloc_sym.exp
> test to verify R_MICROBLAZE_32_NONE relocation type.

Approved - please apply.

Cheers
   Nick
Michael Eager Nov. 10, 2023, 4:14 p.m. UTC | #2
On 11/10/23 06:28, Nick Clifton wrote:
> Hi Neal,
> 
>> This patch adds code to the gas/microblaze/reloc_sym.exp
>> test to verify R_MICROBLAZE_32_NONE relocation type.
> 
> Approved - please apply.
> 

This patch was applied 10/20/23.
diff mbox series

Patch

diff --git a/gas/testsuite/gas/microblaze/reloc_sym.d b/gas/testsuite/gas/microblaze/reloc_sym.d
index 571ffe1bba8..cbc55633a2f 100644
--- a/gas/testsuite/gas/microblaze/reloc_sym.d
+++ b/gas/testsuite/gas/microblaze/reloc_sym.d
@@ -30,6 +30,11 @@  Disassembly of section .text:
 100000a8:	30210020 	addik	r1, r1, 32
 100000ac:	b60f0008 	rtsd	r15, 8
 100000b0:	80000000 	or	r0, r0, r0
+100000b4:	14422003 	cmpu	r2, r2, r4
+100000b8:	be220004 	bneid	r2, 4	// 100000bc <reloc_none_test>
+
+100000bc <reloc_none_test>:
+100000bc:	a0630001 	ori	r3, r3, 1
 
 Disassembly of section .testsection:
 
diff --git a/gas/testsuite/gas/microblaze/reloc_weaksym.s b/gas/testsuite/gas/microblaze/reloc_weaksym.s
index 7dd9b981462..44258093376 100644
--- a/gas/testsuite/gas/microblaze/reloc_weaksym.s
+++ b/gas/testsuite/gas/microblaze/reloc_weaksym.s
@@ -42,7 +42,8 @@  main:
 	addik	r1,r1,32
 	rtsd	r15,8
 	nop		# Unfilled delay slot
-
+	cmpu	r2,r2,r4
+	BNEID	r2,reloc_none_test
 	.end	main
 $Lfe2:
 	.size	main,$Lfe2-main
@@ -50,3 +51,5 @@  $Lfe2:
 	test_start = __def_start
 	.globl	test_start_strong
 	test_start_strong = __def_start
+reloc_none_test:
+	ori	r3,r3,1