lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lightning] Reducing opcode permutations


From: Sandro Magi
Subject: [Lightning] Reducing opcode permutations
Date: Tue, 25 Mar 2008 22:12:17 -0400

I'm currently writing a C library around Lightning so I can use it in
an FFI, but defining all of the permutations for type x operation x
register or immediate is cumbersome.

I have a way to reduce the permutations, but I'm not sure whether the
underlying assumption is sound, so hopefully someone here can clarify.
The idea is basically that any register-register operations don't need
a type qualifier. This assumption seemed sound for integer operations,
but floating point makes me pause; single vs double floating point may
actually involve different instructions. Now I'm not sure about
integer ops either.

The idea is:

addr_c
addr_uc
addr_i
addr_ui
addr_l
addr_ul
addr_p

Would all be collapsed down to simply: addr, since addr is a
register-register operation, the actual widths shouldn't really
matter. The widths only matter when we're writing to the register from
memory, or reading from the register to memory. This the applies to
all the other register-register instructions which significantly
reduces the permutations needed.

Is this assumption sound?

Sandro




reply via email to

[Prev in Thread] Current Thread [Next in Thread]