Package org.jnode.vm.x86.compiler.l1b

Examples of org.jnode.vm.x86.compiler.l1b.MagicHelper


        final MSR[] countMSRs = new MSR[cnt];
        final MSR[] selectMSRs = new MSR[cnt];

        for (int i = 0; i < cnt; i++) {
            final DualMSREvent e = (DualMSREvent) events[i];
            countMSRs[i] = new MSR(this.countMSRIndexes[i]);
            selectMSRs[i] = new MSR(this.selectMSRIndexes[i], e.getSelectValue());
        }

        // Install MSR's
        thread.setMSRs(countMSRs, selectMSRs);
    }
View Full Code Here


            // Find a free ESCR
            final ESCR_RES escr = findFreeESCR(escrState, counterState, evt);
            final CounterMSRInfo cntInfo = counters[indexOf(counterState, evt)];

            // Create the MSRs
            selectMSRs[i * 2 + 0] = new MSR(escr.escr, evt.createESCRValue());
            selectMSRs[i * 2 + 1] = new MSR(cntInfo.cccrMSRIndex, evt.createCCCRValue());
            counterMSRs[i] = new MSR(cntInfo.counterMSRIndex);

            i++;
        }

        thread.setMSRs(counterMSRs, selectMSRs);
View Full Code Here

        final String processorId = System.getProperty("cpu", "p5");
        final String dir = System.getProperty("classes.dir", ".");
        final String archName = System.getProperty("arch", "x86");

        final VmX86Architecture arch;
        if (archName.equals("x86_64")) {
            arch = new VmX86Architecture64();
        } else {
            arch = new VmX86Architecture32();
        }
        final VmSystemClassLoader cl = new VmSystemClassLoader(new java.net.URL[]{
            new File("./core/build/classes/").getCanonicalFile().toURI().toURL(),
            new File("./distr/build/classes/").getCanonicalFile().toURI().toURL(),
            new URL("jar:" + new File("./all/lib/classlib.jar").getCanonicalFile().toURI().toURL() + "!/"),
        }, arch);

        final VmImpl vm = new VmImpl("?", arch, cl.getSharedStatics(), false, cl, null);
        vm.toString();
        VmType.initializeForBootImage(cl);
        System.out.println("Architecture: " + arch.getFullName());

        //final ObjectResolver resolver = new DummyResolver();
        final X86CpuID cpuId = X86CpuID.createID(processorId);
        //NativeCodeCompiler c = cs[0];
        final NativeCodeCompiler[] cs = {
View Full Code Here

    public static void main(String[] args) throws Exception {

        final String processorId = System.getProperty("cpu", "p5");
        final String dir = System.getProperty("classes.dir", ".");

        final VmX86Architecture arch = new VmX86Architecture32();
        final VmSystemClassLoader cl = new VmSystemClassLoader(new URL[]{new File(dir)
            .toURL()}, arch, new CompilerTest.DummyResolver());
        final IMTCompiler cmp = arch.getIMTCompiler();
        cmp.initialize(cl);
        VmType.initializeForBootImage(cl);
        final VmImpl vm = new VmImpl("?", arch, cl.getSharedStatics(), false, cl, null);
        vm.toString();
View Full Code Here

     */
    @Before
    public void setUp() throws Exception {
        VmSystemClassLoader bib =
                new VmSystemClassLoader(new URL("file:///" + System.getProperty("classes.dir") +
                        "/"), new VmX86Architecture32());
        VmType.initializeForBootImage(bib);
        clc = bib;
    }
View Full Code Here

    public static void main(String[] args)
        throws Exception {

        final String className = (args.length > 0) ? args[0] : "java.lang.Object";
        final VmSystemClassLoader loader = new VmSystemClassLoader(new File(".").toURL(), new VmX86Architecture32());
        final VmType vmClass = loader.loadClass(className, true);

        for (int i = 0; i < vmClass.getNoDeclaredMethods(); i++) {
            TestCFG(vmClass.getDeclaredMethod(i));
        }
View Full Code Here

        final VmX86Architecture arch;
        if (archName.equals("x86_64")) {
            arch = new VmX86Architecture64();
        } else {
            arch = new VmX86Architecture32();
        }
        final VmSystemClassLoader cl = new VmSystemClassLoader(new java.net.URL[]{
            new File("./core/build/classes/").getCanonicalFile().toURI().toURL(),
            new File("./distr/build/classes/").getCanonicalFile().toURI().toURL(),
            new URL("jar:" + new File("./all/lib/classlib.jar").getCanonicalFile().toURI().toURL() + "!/"),
View Full Code Here

        //VmByteCode code = loadByteCode(className, "discriminant");
        //VmByteCode code = loadByteCode(className, "arithOptIntx");
        //VmByteCode code = loadByteCode(className, "simpleWhile");
        //VmByteCode code = loadByteCode(className, "terniary2");

        VmX86Architecture32 arch = new VmX86Architecture32();
        VmSystemClassLoader loader = new VmSystemClassLoader(new URL[]{
            new File("core/build/classes").toURL(),
            new File("distr/build/classes").toURL(),
            new File("local/classlib").toURL()
        }, arch);
View Full Code Here

    }

    private static VmByteCode loadByteCode(String className, String methodName)
        throws MalformedURLException, ClassNotFoundException, InstantiationException {
        //VmSystemClassLoader vmc = new VmSystemClassLoader(new File(".").toURL(), new VmX86Architecture32());
        VmX86Architecture32 arch = new VmX86Architecture32();
        VmSystemClassLoader vmc = new VmSystemClassLoader(new URL[]{
            new File("core/build/classes").toURL(),
            new File("local/classlib").toURL()
        }, arch);
        new VmImpl("?", arch, vmc.getSharedStatics(), true, vmc, null);
View Full Code Here

    public static void main(String[] args) throws Exception {

        final String processorId = System.getProperty("cpu", "p5");
        final String dir = System.getProperty("classes.dir", ".");

        final VmX86Architecture arch = new VmX86Architecture32();
        final VmSystemClassLoader cl = new VmSystemClassLoader(new URL[]{new File(dir)
            .toURL()}, arch, new CompilerTest.DummyResolver());
        final IMTCompiler cmp = arch.getIMTCompiler();
        cmp.initialize(cl);
        VmType.initializeForBootImage(cl);
        final VmImpl vm = new VmImpl("?", arch, cl.getSharedStatics(), false, cl, null);
        vm.toString();
View Full Code Here

TOP

Related Classes of org.jnode.vm.x86.compiler.l1b.MagicHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.