2 Copyright (c) 2003-2006 Hewlett-Packard Development Company, L.P.
3 Permission is hereby granted, free of charge, to any person
4 obtaining a copy of this software and associated documentation
5 files (the "Software"), to deal in the Software without
6 restriction, including without limitation the rights to use,
7 copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the
9 Software is furnished to do so, subject to the following
12 The above copyright notice and this permission notice shall be
13 included in all copies or substantial portions of the Software.
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 OTHER DEALINGS IN THE SOFTWARE.
35 #define SBREG_PRIUNAT 5
39 #define SBREG_GR (0 + NSB_SPECIAL)
40 #define SBREG_BR (SBREG_GR + NSB_GR)
41 #define SBREG_FR (SBREG_BR + NSB_BR)
43 #define NSBREG_NOFR (NSB_SPECIAL + NSB_GR + NSB_BR)
44 #define NSBREG (NSB_SPECIAL + NSB_GR + NSB_BR + NSB_FR)
46 struct uwx_scoreboard {
47 struct uwx_scoreboard *nextused;
48 struct uwx_scoreboard *nextfree;
49 struct uwx_scoreboard *nextstack;
50 struct uwx_scoreboard *nextlabel;
51 uint64_t rstate[NSBREG];
57 extern void uwx_prealloc_scoreboard(
59 struct uwx_scoreboard *sb);
61 extern struct uwx_scoreboard *uwx_alloc_scoreboard(struct uwx_env *env);
63 extern struct uwx_scoreboard *uwx_init_scoreboards(struct uwx_env *env);
65 extern struct uwx_scoreboard *uwx_new_scoreboard(
67 struct uwx_scoreboard *prevsb);
69 extern struct uwx_scoreboard *uwx_pop_scoreboards(
71 struct uwx_scoreboard *sb,
74 extern int uwx_label_scoreboard(
76 struct uwx_scoreboard *sb,
79 extern int uwx_copy_scoreboard(
81 struct uwx_scoreboard *sb,
84 extern void uwx_free_scoreboards(struct uwx_env *env);