Author Topic: Downgrading a register  (Read 8623 times)

nobody

  • Guest
Downgrading a register
« on: December 04, 2007, 01:19:13 AM »
Has anyone a suitable solution for "downgrading" a register? So that I don't have to use 2 parameters in the demo below and the second one (al) is somehow generated from the first (eax)? This also applies for rax -> eax registers, so an if/else machinery of 16 entries is not the kind of code that I have in mind, especially if I have to use it for each code line.

Thanks for any ideas.

---

demo eax, al

%macro demo 2

cmp   %1, 1000
  setge %2           ; setcc r8

%endmacro