SunOS_i386_exports.py revision a88953ac5b9988667a57d0dd230f1f7ae0d2579f
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync# Copyright (C) 2009 Sun Microsystems, Inc.
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync# available from http://www.virtualbox.org. This file is free software;
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync# you can redistribute it and/or modify it under the terms of the GNU
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync# General Public License (GPL) as published by the Free Software
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync# additional information or have any questions.
d46ee884c41b808b239563b1978468aae12e33a2vboxsync #apiutil.CopyrightC()
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync # Get sorted list of dispatched functions.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync # The order is very important - it must match cr_opcodes.h
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync # and spu_dispatch_table.h
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync print '%include "iprt/asmdefs.mac"'
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync print "%ifdef RT_ARCH_AMD64"
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync print "extern glim"
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync print "%else ; X86"
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync print "extern glim"
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync print "%endif"
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
d46ee884c41b808b239563b1978468aae12e33a2vboxsync print "%ifdef RT_ARCH_AMD64"
d46ee884c41b808b239563b1978468aae12e33a2vboxsync print "\tjmp \t[glim+%d wrt rip wrt ..gotpcrel]" % (8*index)
d46ee884c41b808b239563b1978468aae12e33a2vboxsync print "%else ; X86"
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync print "%endif"
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync print '; Aliases'
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync # Now loop over all the functions and take care of any aliases
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync allkeys = apiutil.GetAllFunctions(sys.argv[1]+"/APIspec.txt")
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync # we already processed this function earlier
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync # alias is the function we're aliasing
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync # this dict lookup should never fail (raise an exception)!
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync print "%ifdef RT_ARCH_AMD64"
71e8510a26b72d539cf6d7d7157bd87a53de8cf4vboxsync print "\tjmp \t[glim+%d wrt rip wrt ..gotpcrel]" % (8*index)
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync print "%else ; X86"
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync print "%endif"
e33247bff4fddfdba92538374bcc9e2753044a38vboxsync print '; No-op stubs'
8cd393943ea52545c4d063f5a94436639f0f80b6vboxsync # Now generate no-op stub functions
fe06619ae576367ff3568e6abd99fb8ad28cc73avboxsync print "\tleave"
e33247bff4fddfdba92538374bcc9e2753044a38vboxsync print "\tret"