*
* To compile with SC4.x/SC5.x:
*
- * cc -xarch=v[9|8plus] -DULTRASPARC -DMD5_BLOCK_DATA_ORDER \
+ * cc -xarch=v[9|8plus] -DOPENSSL_SYSNAME_ULTRASPARC -DMD5_BLOCK_DATA_ORDER \
* -c md5-sparcv9.S
*
* and with gcc:
*
- * gcc -mcpu=ultrasparc -DULTRASPARC -DMD5_BLOCK_DATA_ORDER \
+ * gcc -mcpu=ultrasparc -DOPENSSL_SYSNAME_ULTRASPARC -DMD5_BLOCK_DATA_ORDER \
* -c md5-sparcv9.S
*
* or if above fails (it does if you have gas):
#define Dval R8
#if defined(MD5_BLOCK_DATA_ORDER)
-# if defined(ULTRASPARC)
+# if defined(OPENSSL_SYSNAME_ULTRASPARC)
# define LOAD lda
# define X(i) [%i1+i*4]%asi
# define md5_block md5_block_asm_data_order_aligned
#endif
.section ".text",#alloc,#execinstr
+
#if defined(__SUNPRO_C) && defined(__sparcv9)
/* They've said -xarch=v9 at command line */
.register %g2,#scratch
.register %g3,#scratch
# define FRAME -192
+#elif defined(__GNUC__) && defined(__arch64__)
+ /* They've said -m64 at command line */
+ .register %g2,#scratch
+ .register %g3,#scratch
+# define FRAME -192
#else
# define FRAME -96
#endif
save %sp,FRAME,%sp
ld [Dptr],D
-#ifdef ASI_PRIMARY_LITTLE
- mov %asi,%o7 ! How dare I? Well, I just do:-)
-#else
- nop
-#endif
ld [Cptr],C
-#ifdef ASI_PRIMARY_LITTLE
- mov ASI_PRIMARY_LITTLE,%asi
-#else
- nop
-#endif
ld [Bptr],B
- nop
ld [Aptr],A
- nop
+#ifdef ASI_PRIMARY_LITTLE
+ rd %asi,%o7 ! How dare I? Well, I just do:-)
+ wr %g0,ASI_PRIMARY_LITTLE,%asi
+#endif
LOAD X(0),R0
- nop
- ba .Lmd5_block_loop
- nop
-.align 32
.Lmd5_block_loop:
!!!!!!!!Round 0
st B,[Bptr]
nop !=
-#ifdef ULTRASPARC
+#ifdef OPENSSL_SYSNAME_ULTRASPARC
bg,a,pt %icc,.Lmd5_block_loop
#else
bg,a .Lmd5_block_loop
LOAD X(0),R0
#ifdef ASI_PRIMARY_LITTLE
- mov %o7,%asi
+ wr %g0,%o7,%asi
#endif
ret
restore %g0,0,%o0