This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

e500 architecture and branch instructions


Hi,

I get an issue with branch instructions with the e500 architecture. I
use binutils 2.18.50.

I wrote this code.
===============================
	.section .text,"ax",@progbits

	nop
	nop
	nop
	bl 31
	nop
	b 4
	nop
	nop
	bla 4
===============================
I got this error:
asm.S: Assembler messages:
asm.S:6: Error: operand out of domain (31 is not a multiple of 4)

Definition of a branch instruction in EREF: A Reference for Freescale
Book E and the e500 Core: Chapter 8

if AA=1 then a ← 640 else a ← CIA
if E=0 then NIA ← 320 || (a + EXTS(LI||0b00))32:63
if LK=1 then LR ← CIA + 4

Chapter 8
|| Describes the concatenation of two values. For example, 010 || 111
is the same as 010111.

Nothing forbidden 31||0b00, to perform a jump of 31 instructions. PC
<- PC + 31*4 and not PC <- PC + 31/4 like seems to say the error
message.

Where is my mistake ? How to perform a jump of 31 instructions without
to use a label ?

Thanks for the help,
Claude


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]