mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-06 13:55:22 +02:00
s390/alternatives: use instructions instead of byte patterns
Use readable nop instructions within the code which generates the padding areas, instead of unreadable byte patterns. The generated code is identical. Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
parent
f09354ffd8
commit
4afeb67071
|
@ -37,9 +37,15 @@
|
||||||
* a 2-byte nop if the size of the area is not divisible by 6.
|
* a 2-byte nop if the size of the area is not divisible by 6.
|
||||||
*/
|
*/
|
||||||
.macro alt_pad_fill bytes
|
.macro alt_pad_fill bytes
|
||||||
.fill ( \bytes ) / 6, 6, 0xc0040000
|
.rept ( \bytes ) / 6
|
||||||
.fill ( \bytes ) % 6 / 4, 4, 0x47000000
|
jgnop .
|
||||||
.fill ( \bytes ) % 6 % 4 / 2, 2, 0x0700
|
.endr
|
||||||
|
.rept ( \bytes ) % 6 / 4
|
||||||
|
nop
|
||||||
|
.endr
|
||||||
|
.rept ( \bytes ) % 6 % 4 / 2
|
||||||
|
nopr
|
||||||
|
.endr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -71,11 +71,18 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
|
||||||
".if " oldinstr_pad_len(num) " > 6\n" \
|
".if " oldinstr_pad_len(num) " > 6\n" \
|
||||||
"\tjg " e_oldinstr_pad_end "f\n" \
|
"\tjg " e_oldinstr_pad_end "f\n" \
|
||||||
"6620:\n" \
|
"6620:\n" \
|
||||||
"\t.fill (" oldinstr_pad_len(num) " - (6620b-662b)) / 2, 2, 0x0700\n" \
|
"\t.rept (" oldinstr_pad_len(num) " - (6620b-662b)) / 2\n" \
|
||||||
|
"\tnopr\n" \
|
||||||
".else\n" \
|
".else\n" \
|
||||||
"\t.fill " oldinstr_pad_len(num) " / 6, 6, 0xc0040000\n" \
|
"\t.rept " oldinstr_pad_len(num) " / 6\n" \
|
||||||
"\t.fill " oldinstr_pad_len(num) " %% 6 / 4, 4, 0x47000000\n" \
|
"\t.jgnop .\n" \
|
||||||
"\t.fill " oldinstr_pad_len(num) " %% 6 %% 4 / 2, 2, 0x0700\n" \
|
"\t.endr\n" \
|
||||||
|
"\t.rept " oldinstr_pad_len(num) " %% 6 / 4\n" \
|
||||||
|
"\tnop\n" \
|
||||||
|
"\t.endr\n" \
|
||||||
|
"\t.rept " oldinstr_pad_len(num) " %% 6 %% 4 / 2\n" \
|
||||||
|
"\tnopr\n" \
|
||||||
|
".endr\n" \
|
||||||
".endif\n"
|
".endif\n"
|
||||||
|
|
||||||
#define OLDINSTR(oldinstr, num) \
|
#define OLDINSTR(oldinstr, num) \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user