Issue 12 in jitasm: Enhancement: a way to access the Reg8/Reg16 part of a Reg32

0 views
Skip to first unread message

jit...@googlecode.com

unread,
Mar 27, 2012, 8:59:38 AM3/27/12
to jitasm...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 12 by bmar...@gmail.com: Enhancement: a way to access the
Reg8/Reg16 part of a Reg32
http://code.google.com/p/jitasm/issues/detail?id=12

It would be nice to have a way of extracting the low byte/word/dword from a
Reg; or, given a Reg8 variable to get the associated Reg32. It could prove
useful in code like this:

Reg32 r;
/* do some stuff with the generic Reg32 */
...
movzx(r, as_reg8(r)); /* zero extend low byte */


For now I hacked Reg32 (and the others) to include:

explicit Reg32(const Opd &r) :
Opd32(RegID::CreatePhysicalRegID(r.reg_.type, (PhysicalRegID) r.reg_.id)) {}
Reg8 r8() { Reg8 r(*this); return r; }
Reg16 r16() { Reg16 r(*this); return r; }

This allows me to write: movzx(r, r.r8());

But I'd still like a proper way to do it (the Opd argument to the
constructor is unsafe and I'm also abusing CreatePhysicalRegID).


jit...@googlecode.com

unread,
Apr 10, 2012, 8:51:39 PM4/10/12
to jitasm...@googlegroups.com
Updates:
Status: Accepted
Owner: aki.yamasaki
Labels: -Type-Defect Type-Enhancement OpSys-All

Comment #1 on issue 12 by hikaruk...@gmail.com: Enhancement: a way to

access the Reg8/Reg16 part of a Reg32
http://code.google.com/p/jitasm/issues/detail?id=12

(No comment was entered for this change.)

jit...@googlecode.com

unread,
Oct 5, 2013, 6:01:02 PM10/5/13
to jitasm...@googlegroups.com

Comment #2 on issue 12 by hlide.de...@gmail.com: Enhancement: a way to
access the Reg8/Reg16 part of a Reg32
http://code.google.com/p/jitasm/issues/detail?id=12

Is that enhancement added to the last release ? I fail to see that
enhancement implemented somewhere in jitasm.h.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages