VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/SunOS_i386_exports.py@ 28800

Last change on this file since 28800 was 28800, checked in by vboxsync, 14 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1#
2# Copyright (C) 2009 Oracle Corporation
3#
4# This file is part of VirtualBox Open Source Edition (OSE), as
5# available from http://www.virtualbox.org. This file is free software;
6# you can redistribute it and/or modify it under the terms of the GNU
7# General Public License (GPL) as published by the Free Software
8# Foundation, in version 2 as it comes in the "COPYING" file of the
9# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
10# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
11#
12
13import sys
14
15import apiutil
16
17
18def GenerateEntrypoints():
19
20 #apiutil.CopyrightC()
21
22 # Get sorted list of dispatched functions.
23 # The order is very important - it must match cr_opcodes.h
24 # and spu_dispatch_table.h
25 print '%include "iprt/asmdefs.mac"'
26 print ""
27 print "%ifdef RT_ARCH_AMD64"
28 print "extern glim"
29 print "%else ; X86"
30 print "extern glim"
31 print "%endif"
32 print ""
33
34 keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
35
36 for index in range(len(keys)):
37 func_name = keys[index]
38 if apiutil.Category(func_name) == "Chromium":
39 continue
40
41 print "BEGINPROC_EXPORTED gl%s" % func_name
42 print "%ifdef RT_ARCH_AMD64"
43 print "\tjmp \t[glim+%d wrt rip wrt ..gotpcrel]" % (8*index)
44 print "%else ; X86"
45 print "\tjmp \t[glim+%d wrt ..gotpc]" % (4*index)
46 print "%endif"
47 print "ENDPROC gl%s" % func_name
48 print ""
49
50
51 print ';'
52 print '; Aliases'
53 print ';'
54
55 # Now loop over all the functions and take care of any aliases
56 allkeys = apiutil.GetAllFunctions(sys.argv[1]+"/APIspec.txt")
57 for func_name in allkeys:
58 if "omit" in apiutil.ChromiumProps(func_name):
59 continue
60
61 if func_name in keys:
62 # we already processed this function earlier
63 continue
64
65 # alias is the function we're aliasing
66 alias = apiutil.Alias(func_name)
67 if alias:
68 # this dict lookup should never fail (raise an exception)!
69 index = keys.index(alias)
70 print "BEGINPROC_EXPORTED gl%s" % func_name
71 print "%ifdef RT_ARCH_AMD64"
72 print "\tjmp \t[glim+%d wrt rip wrt ..gotpcrel]" % (8*index)
73 print "%else ; X86"
74 print "\tjmp \t[glim+%d wrt ..gotpc]" % (4*index)
75 print "%endif"
76 print "ENDPROC gl%s" % func_name
77 print ""
78
79
80 print ';'
81 print '; No-op stubs'
82 print ';'
83
84 # Now generate no-op stub functions
85 for func_name in allkeys:
86 if "stub" in apiutil.ChromiumProps(func_name):
87 print "BEGINPROC_EXPORTED gl%s" % func_name
88 print "\tleave"
89 print "\tret"
90 print "ENDPROC gl%s" % func_name
91 print ""
92
93
94GenerateEntrypoints()
95
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use