--- pgp/src/sparc.s 2018/04/24 16:38:28 1.1.1.2 +++ pgp/src/sparc.s 2018/04/24 16:44:32 1.1.1.4 @@ -7,19 +7,29 @@ ! ! other sources must be compiled with UNIT32 and HIGHFIRST defined ! +#ifndef SYSV +#ifdef __STDC__ +#define ENTRY(name) _##name ; _##name##: +#else +#define ENTRY(name) _/**/name ; _/**/name/**/: +#endif +#define GLOB _global_precision +#else /* SYSV */ +#define ENTRY(name) name ; name: +#define GLOB global_precision +#endif + .seg "text" .proc 4 - .global _P_SETP -_P_SETP: + .global ENTRY(P_SETP) retl nop .proc 4 - .global _P_ADDC -_P_ADDC: - sethi %hi(_global_precision), %o3 - ldsh [%o3+%lo(_global_precision)], %o3 + .global ENTRY(P_ADDC) + sethi %hi(GLOB), %o3 + ldsh [%o3+%lo(GLOB)], %o3 and %o2, 1, %o2 dec %o3 sll %o3, 2, %o3 @@ -38,10 +48,9 @@ add_loop: .proc 4 - .global _P_SUBB -_P_SUBB: - sethi %hi(_global_precision), %o3 - ldsh [%o3+%lo(_global_precision)], %o3 + .global ENTRY(P_SUBB) + sethi %hi(GLOB), %o3 + ldsh [%o3+%lo(GLOB)], %o3 and %o2, 1, %o2 dec %o3 sll %o3, 2, %o3 @@ -60,10 +69,9 @@ sub_loop: .proc 4 - .global _P_ROTL -_P_ROTL: - sethi %hi(_global_precision), %o3 - ldsh [%o3+%lo(_global_precision)], %o3 + .global ENTRY(P_ROTL) + sethi %hi(GLOB), %o3 + ldsh [%o3+%lo(GLOB)], %o3 and %o1, 1, %o1 dec %o3 sll %o3, 2, %o3