mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-03 20:50:19 +00:00
8332724: x86 MacroAssembler may over-align code
Reviewed-by: dlong, kvn
This commit is contained in:
parent
97ee2ffb89
commit
08d51003d1
@ -3918,7 +3918,7 @@ void Assembler::negl(Address dst) {
|
||||
emit_operand(as_Register(3), dst, 0);
|
||||
}
|
||||
|
||||
void Assembler::nop(int i) {
|
||||
void Assembler::nop(uint i) {
|
||||
#ifdef ASSERT
|
||||
assert(i > 0, " ");
|
||||
// The fancy nops aren't currently recognized by debuggers making it a
|
||||
|
||||
@ -1800,7 +1800,7 @@ private:
|
||||
void negq(Address dst);
|
||||
#endif
|
||||
|
||||
void nop(int i = 1);
|
||||
void nop(uint i = 1);
|
||||
|
||||
void notl(Register dst);
|
||||
|
||||
|
||||
@ -1150,20 +1150,20 @@ void MacroAssembler::addpd(XMMRegister dst, AddressLiteral src, Register rscratc
|
||||
// Stub code is generated once and never copied.
|
||||
// NMethods can't use this because they get copied and we can't force alignment > 32 bytes.
|
||||
void MacroAssembler::align64() {
|
||||
align(64, (unsigned long long) pc());
|
||||
align(64, (uint)(uintptr_t)pc());
|
||||
}
|
||||
|
||||
void MacroAssembler::align32() {
|
||||
align(32, (unsigned long long) pc());
|
||||
align(32, (uint)(uintptr_t)pc());
|
||||
}
|
||||
|
||||
void MacroAssembler::align(int modulus) {
|
||||
void MacroAssembler::align(uint modulus) {
|
||||
// 8273459: Ensure alignment is possible with current segment alignment
|
||||
assert(modulus <= CodeEntryAlignment, "Alignment must be <= CodeEntryAlignment");
|
||||
assert(modulus <= (uintx)CodeEntryAlignment, "Alignment must be <= CodeEntryAlignment");
|
||||
align(modulus, offset());
|
||||
}
|
||||
|
||||
void MacroAssembler::align(int modulus, int target) {
|
||||
void MacroAssembler::align(uint modulus, uint target) {
|
||||
if (target % modulus != 0) {
|
||||
nop(modulus - (target % modulus));
|
||||
}
|
||||
|
||||
@ -213,8 +213,8 @@ class MacroAssembler: public Assembler {
|
||||
// Alignment
|
||||
void align32();
|
||||
void align64();
|
||||
void align(int modulus);
|
||||
void align(int modulus, int target);
|
||||
void align(uint modulus);
|
||||
void align(uint modulus, uint target);
|
||||
|
||||
void post_call_nop();
|
||||
// A 5 byte nop that is safe for patching (see patch_verified_entry)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user