Access register from Compiler class

23 views
Skip to first unread message

Ryan Gonzalez

unread,
Nov 5, 2013, 8:37:01 PM11/5/13
to asmji...@googlegroups.com
I'm writing an interpreter using AsmJit. Now, I need to add to/subtract from/etc. one of the registers. The problem: the add/sub functions in the Compiler class require GpVar variables, while I'm using GpRegs. Is there a way to solve this?

--
Ryan

Petr Kobalíček

unread,
Nov 5, 2013, 9:24:11 PM11/5/13
to asmjit-dev
Hi Ryan,

in the case that you are using physical registers (i.e. you have your own register allocator) I think it's better to use Assembler instead of Compiler, because this way you have more control of the code generated. However, you have to understand calling conventions to do that, but I think it's not a big deal.

I'm not sure whether this was helpful, though.

Best,
Petr

--
 
---
You received this message because you are subscribed to the Google Groups "asmjit-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to asmjit-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Petr Kobalíček

unread,
Nov 5, 2013, 9:24:47 PM11/5/13
to asmjit-dev
To answer your question: Compiler doesn't allow to use physical registers.

Best,
Petr

itre...@gmail.com

unread,
Nov 11, 2013, 9:50:35 PM11/11/13
to asmji...@googlegroups.com
Is it possible to use alloc(gpvar, rdx), for example?
Reply all
Reply to author
Forward
0 new messages