microblaze: Fix unaligned exception for little endian platform
Half word unaligned accesses need to be fixed. Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
@@ -945,11 +945,20 @@ store3: sbi r3, r4, 2;
|
|||||||
store4: sbi r3, r4, 3; /* Delay slot */
|
store4: sbi r3, r4, 3; /* Delay slot */
|
||||||
ex_shw_vm:
|
ex_shw_vm:
|
||||||
/* Store the lower half-word, byte-by-byte into destination address */
|
/* Store the lower half-word, byte-by-byte into destination address */
|
||||||
|
#ifdef __MICROBLAZEEL__
|
||||||
|
lbui r3, r5, 0;
|
||||||
|
store5: sbi r3, r4, 0;
|
||||||
|
lbui r3, r5, 1;
|
||||||
|
brid ret_from_exc;
|
||||||
|
store6: sbi r3, r4, 1; /* Delay slot */
|
||||||
|
#else
|
||||||
lbui r3, r5, 2;
|
lbui r3, r5, 2;
|
||||||
store5: sbi r3, r4, 0;
|
store5: sbi r3, r4, 0;
|
||||||
lbui r3, r5, 3;
|
lbui r3, r5, 3;
|
||||||
brid ret_from_exc;
|
brid ret_from_exc;
|
||||||
store6: sbi r3, r4, 1; /* Delay slot */
|
store6: sbi r3, r4, 1; /* Delay slot */
|
||||||
|
#endif
|
||||||
|
|
||||||
ex_sw_end_vm: /* Exception handling of store word, ends. */
|
ex_sw_end_vm: /* Exception handling of store word, ends. */
|
||||||
|
|
||||||
/* We have to prevent cases that get/put_user macros get unaligned pointer
|
/* We have to prevent cases that get/put_user macros get unaligned pointer
|
||||||
|
Reference in New Issue
Block a user