< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.amd64/src/org/graalvm/compiler/asm/amd64/AMD64MacroAssembler.java

Print this page
rev 52509 : [mq]: graal

*** 1,7 **** /* ! * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 22,31 **** --- 22,33 ---- */ package org.graalvm.compiler.asm.amd64; + import static jdk.vm.ci.amd64.AMD64.rbp; + import static jdk.vm.ci.amd64.AMD64.rsp; import static org.graalvm.compiler.asm.amd64.AMD64AsmOptions.UseIncDec; import static org.graalvm.compiler.asm.amd64.AMD64AsmOptions.UseXmmLoadAndClearUpper; import static org.graalvm.compiler.asm.amd64.AMD64AsmOptions.UseXmmRegToRegMoveAll; import org.graalvm.compiler.core.common.NumUtil;
*** 80,89 **** --- 82,105 ---- } else { subq(dst, value); } } + public final void enter(int frameSize) { + if (NumUtil.isUShort(frameSize)) { + // Can use enter instruction only for frame size that fits in 16 bits. + emitByte(0xC8); + emitShort(frameSize); + emitByte(0x00); + } else { + // Fall back to manual sequence. + push(rbp); + movq(rbp, rsp); + decrementq(rsp, frameSize); + } + } + public void incrementq(Register reg, int value) { if (value == Integer.MIN_VALUE) { addq(reg, value); return; }
< prev index next >