Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 30 Oct 2013 12:24:44 +0400
From: Solar Designer <>
Subject: Re: Linux-X32 support for DES_BS_ASM

On Tue, Oct 29, 2013 at 11:39:13PM +0100, magnum wrote:
> After warming up with Win64 I thought I'd have another go at enabling 
> DES_BS_ASM for Linux-X32. Contrary to Win64, X32 is exactly like AMD64 
> except pointers and longs are 32-bit. The NT assembler works fine as-is, 
> my problem is DES.


> I was hoping to get away with concentrating on these:
> /* Sun's assembler can't multiply, but at least it can add... */
> #define nptr(n)				n+n+n+n+n+n+n+n
> #define nvec(n)			 n+n+n+n+n+n+n+n+n+n+n+n+n+n+n+n
> I'm thinking if these are solely used for pointers and vectors 
> respectively, only the first should be changed and this could work:
> #ifdef __ILP32__
> #define nptr(n)				n+n+n+n
> #else
> #define nptr(n)				n+n+n+n+n+n+n+n
> #endif
> #define nvec(n)			 n+n+n+n+n+n+n+n+n+n+n+n+n+n+n+n

This looks right to me.

> ...but I have tried that before (and other variants) to no avail. Are 
> you able to give a quick hint?

Unfortunately, no.

> Perhaps a few constants need a change, such as in this line:
> 	subq $nvec(0x300+48),k_ptr

No, I think these are fine as-is.  In particular, the line above moves
k_ptr back by a certain number of vectors, assuming that DES_BS_EXPAND
is enabled.

Perhaps something else needs to change, but I don't readily know what.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.