Use on AVR

bodrato at mail.dm.unipi.it bodrato at mail.dm.unipi.it
Sat Jun 9 16:20:20 CEST 2012


Ciao,

Il Ven, 8 Giugno 2012 2:10 pm, Torbjorn Granlund ha scritto:
>   Il Mer, 6 Giugno 2012 11:33 am, suzuki-hikotaro-mf at ynu.ac.jp ha scritto:
>   > Could you tell me how to use GMP on AVR. And if you can, please tell
>   > me how to install in Atmel Studio 6.

> AVR is an 8-bit processor with 32 registers.  Some models have 8x8->16
> bit multiply, some lack multply.

Oh, yes, I have one! On my Arduino Duemilanove, a cool prototyping
platform [ http://arduino.cc/en/Main/arduinoBoardDuemilanove ].
Now I don't have it handy, but as soon as I find it, I'll try mini-gmp on
it :-D

> I don't know how well that will work on 8-bit machines, though.

IIRC, with avr-gcc, the unsigned long type exists and it is 32 bits long.
Using them for all operations probably is not the faster way to handle
long integers, because it forces the compiler to use many registers and a
lot of code, but it should work.

In "Atmel Studio 6"... I don't know. But mini-gmp consists of a .c file
and a .h file... It should be manageable.

Regards,
m

-- 
http://bodrato.it/



More information about the gmp-discuss mailing list