[Openmcl-devel] Creating a function from its disassembly
gb at clozure.com
Thu Jun 9 21:48:03 EDT 2005
On Thu, 9 Jun 2005, Gary King wrote:
> Suppose I have the listing returned by disassemble (for example as a string).
> Is there some way for me to compile this assembly code into a callable
> Gary Warren King
I'm not sure that I understand the question, but you can do:
? (ccl::ppc-xdisassemble #'cdr :for-lap t)
(CCL::PPC-LAP-FUNCTION CDR ()
(TWNEI NARGS 4)
(LWZ ARG_Z 0 VSP)
(CLRLWI IMM0 ARG_Z 30)
(TWNEI IMM0 1)
(LWZ ARG_Z -1 ARG_Z)
That pretty-prints a form and returns (VALUES); it might be better if
it returned the form. If you mouse on that "NFUNCTION" form and
execute it, it'll create a function (a "named function", in fact).
Is that the sort of thing that you meant ?
More information about the Openmcl-devel