本文整理匯總了Java中jdk.vm.ci.code.site.DataSectionReference.setOffset方法的典型用法代碼示例。如果您正苦於以下問題:Java DataSectionReference.setOffset方法的具體用法?Java DataSectionReference.setOffset怎麽用?Java DataSectionReference.setOffset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類jdk.vm.ci.code.site.DataSectionReference
的用法示例。
在下文中一共展示了DataSectionReference.setOffset方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: emitLoadFloat
import jdk.vm.ci.code.site.DataSectionReference; //導入方法依賴的package包/類
@Override
public Register emitLoadFloat(float c) {
DataSectionReference ref = new DataSectionReference();
ref.setOffset(data.position());
data.emitFloat(c);
recordDataPatchInCode(ref);
Register ret = AMD64.xmm0;
emitREX(false, ret.encoding, 0, 0);
code.emitByte(0xF3);
code.emitByte(0x0F);
code.emitByte(0x10); // MOVSS xmm1, xmm2/m32
code.emitByte(0x05 | ((ret.encoding & 0x7) << 3)); // xmm, [rip+offset]
code.emitInt(0xDEADDEAD);
return ret;
}
示例2: emitLoadFloat
import jdk.vm.ci.code.site.DataSectionReference; //導入方法依賴的package包/類
public Register emitLoadFloat(Register ret, float c) {
DataSectionReference ref = new DataSectionReference();
ref.setOffset(data.position());
data.emitFloat(c);
recordDataPatchInCode(ref);
emitREX(false, ret.encoding, 0, 0);
code.emitByte(0xF3);
code.emitByte(0x0F);
code.emitByte(0x10); // MOVSS xmm1, xmm2/m32
code.emitByte(0x05 | ((ret.encoding & 0x7) << 3)); // xmm, [rip+offset]
code.emitInt(0xDEADDEAD);
return ret;
}
示例3: emitLoadDouble
import jdk.vm.ci.code.site.DataSectionReference; //導入方法依賴的package包/類
public Register emitLoadDouble(Register ret, double c) {
DataSectionReference ref = new DataSectionReference();
ref.setOffset(data.position());
data.emitDouble(c);
recordDataPatchInCode(ref);
emitREX(false, ret.encoding, 0, 0);
code.emitByte(0xF2);
code.emitByte(0x0F);
code.emitByte(0x10); // MOVSD xmm1, xmm2/m32
code.emitByte(0x05 | ((ret.encoding & 0x7) << 3)); // xmm, [rip+offset]
code.emitInt(0xDEADDEAD);
return ret;
}
示例4: emitDataItem
import jdk.vm.ci.code.site.DataSectionReference; //導入方法依賴的package包/類
public DataSectionReference emitDataItem(HotSpotConstant c) {
DataSectionReference ref = new DataSectionReference();
ref.setOffset(data.position());
recordDataPatchInData(new ConstantReference((VMConstant) c));
if (c.isCompressed()) {
data.emitInt(0xDEADDEAD);
} else {
data.emitLong(0xDEADDEADDEADDEADL);
}
return ref;
}
示例5: loadLongToRegister
import jdk.vm.ci.code.site.DataSectionReference; //導入方法依賴的package包/類
private void loadLongToRegister(long c, Register ret) {
DataSectionReference ref = new DataSectionReference();
data.align(8);
ref.setOffset(data.position());
data.emitLong(c);
emitLoadPointerToRegister(ref, ret);
}
示例6: testInvalidDataSectionReference
import jdk.vm.ci.code.site.DataSectionReference; //導入方法依賴的package包/類
@Test(expected = JVMCIError.class)
public void testInvalidDataSectionReference() {
DataSectionReference ref = new DataSectionReference();
ref.setOffset(0);
installEmptyCode(new Site[0], new Assumption[0], new Comment[0], 16, new DataPatch[]{new DataPatch(0, ref)}, null);
}
示例7: testOutOfBoundsDataSectionReference
import jdk.vm.ci.code.site.DataSectionReference; //導入方法依賴的package包/類
@Test(expected = JVMCIError.class)
public void testOutOfBoundsDataSectionReference() {
DataSectionReference ref = new DataSectionReference();
ref.setOffset(0x1000);
installEmptyCode(new Site[]{new DataPatch(0, ref)}, new Assumption[0], new Comment[0], 16, new DataPatch[0], null);
}