當前位置: 首頁>>代碼示例>>Java>>正文


Java DataSectionReference.setOffset方法代碼示例

本文整理匯總了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;
}
 
開發者ID:campolake,項目名稱:openjdk9,代碼行數:17,代碼來源:AMD64TestAssembler.java

示例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;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:15,代碼來源:AMD64TestAssembler.java

示例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;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:15,代碼來源:AMD64TestAssembler.java

示例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;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:14,代碼來源:TestAssembler.java

示例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);
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:8,代碼來源:SPARCTestAssembler.java

示例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);
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:7,代碼來源:TestInvalidCompilationResult.java

示例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);
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:7,代碼來源:TestInvalidCompilationResult.java


注:本文中的jdk.vm.ci.code.site.DataSectionReference.setOffset方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。