> Date: Fri, 17 Jul 2015 09:11:02 -0400 > From: Chris Marshall <[email protected]> > To: [email protected] > Subject: Re: [Tinycc-devel] build perl5 with tcc? > Message-ID: > <capttexlvcy8zchtqnfvw6rsrgpnoo3-vgtq9yqgeswsny2v...@mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi David- >
> I definitely plan to look at the C::TinyCompiler and XS::TCC > modules once I can get tcc and libtcc running on my cygwin > setup. Unfortunately, a direct cygwin build is not possible > since the needed access to the program counter is not supported. > If you're talking about the x86 instruction pointer, the hardware doesn't support direct access. If you're talking about something else, please clarify. The "standard" trick is to make a function call to some location, and grab the return address from the stack. I recall that in some cases the call is to literally the address immediately after the call, though writing a function that returns it's own return address is probably better if you think you'll do it twice or more. Example code here: http://stackoverflow.com/questions/599968/reading-program-counter-directly _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
