lightning
[Top][All Lists]
Advanced

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

Re: Embedding data in the code stream


From: Marc Nieper-Wißkirchen
Subject: Re: Embedding data in the code stream
Date: Thu, 11 Aug 2022 12:44:08 +0200

Am Do., 11. Aug. 2022 um 12:28 Uhr schrieb Paul Cercueil <paul@crapouillou.net>:
Hi Marc,

Obvious questions first: why would you do that?

Say, I want to implement a VM using GNU lightning.  Code objects would be first-class objects.  Some information (e.g. for the garbage collector) would need to be attached to such code objects to remove the need for an extra pointer indirection.

An example:

jit_align (16);
jit_data_ui (meta_information);
jit_align (16);
entry = label_indirect ();
/* the actual code */
...
unsigned char *addr = jit_address (entry);
unsigned int info = * (unsigned int *) (addr - 16);


reply via email to

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