Re: declare 64 bit integers?



On 2007-09-28, jrwats@xxxxxxxxx <jrwats@xxxxxxxxx> wrote:
I once wrote such a contrib for SBCL implementing "long long"-style
inline (signed-byte 64) arithmetic on x86.

SBCL's register allocation is not designed for pairing of arbitrary
registers, but it was possible to make it work with minimal effort by
only pairing registers that are adjacent (according to the compiler's
idea of how the registers are numbered).

How in the world do I go about doing that?

Well, my solution is for SBCL, so it does not help you with LispWorks
(or whatever implementation you are on). But you can find it in my SBCL
fork on repo.or.cz. Use (require :sb-regpair) to load it, or see the
sources in contrib/sb-regpair/.

Other than that, I can only second the recommendation to use 64 bit
hardware together with an implementation like SBCL that supports
both untagged, inline arithmetic in general and modular arithmetic in
particular.
.



Relevant Pages

  • Re: What is the gain of "inline"
    ... The "inline" directive slows down a program by bloating its code. ... compiler (if they are to be, in fact, located on the stack). ... in the branch delay slot, ... having to spill any values in any caller-save/scratch registers; ...
    (comp.lang.c)
  • Re: A quick c programming survey question
    ... When I can, I use C++ with inline methods, often even ... If no inlining is available, I simulate the inline C using macros, and ... I *never* use inline bit manipulation on registers outside the code ...
    (comp.arch.embedded)
  • Re: Its a shame, a very shame....
    ... > routine should always be inlined whenever it is called" would be very ... let there is some inline routine XYZ which code requres 3 registers ... it's called in piece of code that does not left 3 "free" registers, so optimizer insert call to XYZ; ...
    (borland.public.delphi.non-technical)
  • Re: Disadvantage of using inline
    ... Declaring a function as 'inline' never meant that is has no "independent ... The decision to inline a call is made by the compiler on a per-call ... >> machines, there are so few registers that tying one up is stupid), ...
    (comp.lang.c)
  • Re: preserving flags across inline assembler blocks
    ... I missed the part about *inline*. ... EAX, EBX, ECX, EDX, ESI, EDI registers. ... The __asm block inherits whatever register values result from the normal ... you will need to restore the original direction flag. ...
    (alt.lang.asm)