Intermingling data with code

Any technical questions about the Epiphany chip and Parallella HW Platform.

Moderator: aolofsson

Intermingling data with code

Postby timpart » Wed Jan 16, 2013 9:42 pm

Is it safe to write a sequence like this?
.align 8
B label ; 32 bit version
.word arbitrary data

or even
.align8
JALR R42 ; go somewhere (but don't come back!) R14 handily points to arbitrary data after jump
.word arbitrary data

The pipeline decodes the instructions (stage 3) before executing them (stage 5). If the arbitrary data contained a bit pattern that was an invalid instruction would some kind of fault be generated? If it only generates the fault when instruction reaches stage 5 presumably all would be OK. If at stage 3, it wouldn't.

If a fault does get generated would this work?

.align8
JALR R42 ; go somewhere (but don't come back!) R14 handily points to word before arbitrary data after jump
NOP ; 16 bits each
NOP
.word arbitrary data

Thanks in advance,

Tim
timpart
 
Posts: 302
Joined: Mon Dec 17, 2012 3:25 am
Location: UK

Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 4 guests