Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Ivan Godard <ivan@millcomputing.com> |
|---|---|
| Newsgroups | comp.arch |
| Subject | Re: Agner's Proposal for an ideal extensible instruction set |
| Date | 2015-12-29 02:22 -0800 |
| Organization | A noiseless patient Spider |
| Message-ID | <n5tmn7$do1$1@dont-email.me> (permalink) |
| References | (3 earlier) <n5sg7n$9ud$1@dont-email.me> <n5sirr$ip3$1@dont-email.me> <n5sn5q$f0$1@dont-email.me> <n5sv7s$j2n$1@dont-email.me> <n5tl5f$8o8$2@speranza.aioe.org> |
On 12/29/2015 1:52 AM, Terje Mathisen wrote: > Ivan Godard wrote: >> An immediate address must be known no later than link time in order to >> be put in the code, whereas with ASLR the address to use is not known >> until load time at the earliest, and two concurrent runs of the same >> code will be running at different addresses. >> >> > Is that always true Ivan? > > I thought the linker could insert placeholders for any such immediate > address data, and note them in some sort of fixup list for the loader. > > The loader would go through the fixup list and for each entry there, go > into the code and patch/adjust the entry to match the actual load address. Yes, it can and that's the way you have to do it when the ISA has poor support for based addressing, as many early CPUs (and today's microcontrollers) did. However the relocation is expensive because it touches all the code, and multiple copies must run at the same relocated address or suffer double the code space demand. A modern machine design would use self-relative (and hence position independent) addressing for code, and dedicated or genreg base address registers for data, also position independent. With PIC code the code file only has to be mapped into the address space, but doesn't have to be brought to memory or cache as is required for relocation. While resolving a based address requires a trip through the AGU that a pointer literal does not, that advantage is only present when addressing scalars in global static memory, because the stack and heap must always use based addressing and non-scalar use (indexed and/or offset) needs the AGU anyway. Even for that case, usually the addressing mode that has neither index nor offset can be recognized in the decoder and the address is short-circuited around the AGU so pointer literals have no advantage there either.
Back to comp.arch | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Agner's Proposal for an ideal extensible instruction set Jean-Marc Bourguet <jm@bourguet.org> - 2015-12-28 15:50 +0100
Re: Agner's Proposal for an ideal extensible instruction set Quadibloc <jsavard@ecn.ab.ca> - 2015-12-28 07:12 -0800
Re: Agner's Proposal for an ideal extensible instruction set Piotr Wyderski <peter.pan@neverland.mil> - 2016-01-26 16:38 +0100
Re: Agner's Proposal for an ideal extensible instruction set Quadibloc <jsavard@ecn.ab.ca> - 2016-01-29 12:10 -0800
Re: Agner's Proposal for an ideal extensible instruction set "James Van Buskirk" <not_valid@comcast.net> - 2015-12-28 09:48 -0700
Re: Agner's Proposal for an ideal extensible instruction set Quadibloc <jsavard@ecn.ab.ca> - 2015-12-28 10:29 -0800
Re: Agner's Proposal for an ideal extensible instruction set Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-28 23:01 +0100
Re: Agner's Proposal for an ideal extensible instruction set "James Van Buskirk" <not_valid@comcast.net> - 2015-12-28 16:25 -0700
Re: Agner's Proposal for an ideal extensible instruction set Ivan Godard <ivan@millcomputing.com> - 2015-12-28 16:10 -0800
Re: Agner's Proposal for an ideal extensible instruction set "James Van Buskirk" <not_valid@comcast.net> - 2015-12-28 18:23 -0700
Re: Agner's Proposal for an ideal extensible instruction set Ivan Godard <ivan@millcomputing.com> - 2015-12-28 19:41 -0800
Re: Agner's Proposal for an ideal extensible instruction set Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-29 10:52 +0100
Re: Agner's Proposal for an ideal extensible instruction set Ivan Godard <ivan@millcomputing.com> - 2015-12-29 02:22 -0800
Re: Agner's Proposal for an ideal extensible instruction set Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-29 12:58 +0100
Re: Agner's Proposal for an ideal extensible instruction set Ivan Godard <ivan@millcomputing.com> - 2015-12-29 12:16 -0800
Re: Agner's Proposal for an ideal extensible instruction set Quadibloc <jsavard@ecn.ab.ca> - 2015-12-29 07:25 -0800
Re: Agner's Proposal for an ideal extensible instruction set Walter Banks <walter@bytecraft.com> - 2015-12-29 12:27 -0500
Re: Agner's Proposal for an ideal extensible instruction set Robert Wessel <robertwessel2@yahoo.com> - 2015-12-29 11:46 -0600
Re: Agner's Proposal for an ideal extensible instruction set paul wallich <pw@panix.com> - 2015-12-29 13:00 -0500
Re: Agner's Proposal for an ideal extensible instruction set mrs@kithrup.com (Mike Stump) - 2015-12-29 22:21 +0000
Re: Agner's Proposal for an ideal extensible instruction set anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-29 10:16 +0000
Re: Agner's Proposal for an ideal extensible instruction set Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-29 10:49 +0100
Re: Agner's Proposal for an ideal extensible instruction set Ivan Godard <ivan@millcomputing.com> - 2015-12-29 02:36 -0800
Re: Agner's Proposal for an ideal extensible instruction set "Paul A. Clayton" <paaronclayton@gmail.com> - 2015-12-28 09:23 -0800
Re: Agner's Proposal for an ideal extensible instruction set Quadibloc <jsavard@ecn.ab.ca> - 2015-12-28 10:31 -0800
Re: Agner's Proposal for an ideal extensible instruction set Erik Trulsson <erikt@Update.UU.SE> - 2016-01-20 15:33 +0000
Re: Agner's Proposal for an ideal extensible instruction set Casper H.S. Dik <Casper.Dik@OrSPaMcle.COM> - 2016-01-20 15:39 +0000
Re: Agner's Proposal for an ideal extensible instruction set Terje Mathisen <terje.mathisen@tmsw.no> - 2016-01-20 18:31 +0100
Re: Agner's Proposal for an ideal extensible instruction set Ivan Godard <ivan@millcomputing.com> - 2016-01-20 11:14 -0800
Re: Agner's Proposal for an ideal extensible instruction set mrs@kithrup.com (Mike Stump) - 2016-01-26 03:36 +0000
Re: Agner's Proposal for an ideal extensible instruction set Stefan Monnier <monnier@iro.umontreal.ca> - 2016-01-20 16:44 -0500
Re: Agner's Proposal for an ideal extensible instruction set Terje Mathisen <terje.mathisen@tmsw.no> - 2015-12-28 19:56 +0100
csiph-web