diff options
author | nthnluu <nate1299@me.com> | 2024-01-28 21:20:27 -0500 |
---|---|---|
committer | nthnluu <nate1299@me.com> | 2024-01-28 21:20:27 -0500 |
commit | c63f340d90800895f007de64b7d2d14624263331 (patch) | |
tree | 2c0849fa597dd6da831c8707b6f2603403778d7b /user/lib/ld-weenix/smacros.h |
Created student weenix repository
Diffstat (limited to 'user/lib/ld-weenix/smacros.h')
-rw-r--r-- | user/lib/ld-weenix/smacros.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/user/lib/ld-weenix/smacros.h b/user/lib/ld-weenix/smacros.h new file mode 100644 index 0000000..416b1f2 --- /dev/null +++ b/user/lib/ld-weenix/smacros.h @@ -0,0 +1,40 @@ +/* + * File: smacros.h + * Date: 14 March 1998 + * Acct: David Powell (dep) + * Desc: Some additional SPARC assembly macros + */ + +#ifndef _smacros_h_ +#define _smacros_h_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + /* Local entry points */ + +#define LENTRY(x) \ + .section ".text"; \ + .align 4; \ + .type x, #function; \ + x: + +#define ALTLENTRY(x) \ + .type x, #function; \ + x: + + /* This macro assumes you don't care what happens to %o7 */ + +#define GET_GOT(x) \ + call 1f; \ + sethi % hi(_GLOBAL_OFFSET_TABLE_ + 4), x; \ + 1 : or x, % lo(_GLOBAL_OFFSET_TABLE_ + 8), x; \ + add % o7, x, x + +#ifdef __cplusplus +} +#endif + +#endif /* _smacros_h_ */ |