[Info-vax] VAX Macro to C conversion
Aron Insinga
aron.insinga at vmssoftware.com
Fri Jul 12 18:13:36 EDT 2019
On Friday, July 12, 2019 at 4:18:16 PM UTC-4, VAXman- wrote:
> In article <638a7daa-eb17-4f8a-b3f0-18e0bd9da388 at googlegroups.com>, Aron Insinga writes:
> >On Tuesday, July 9, 2019 at 8:18:14 PM UTC-4, Bill Gunshannon wrote:
> >> On 7/9/19 3:08 AM, Simon Clubley wrote:
> >> > On 2019-07-08, Dave Froble wrote:
> >> >>
> >> >> Macro-32 is an assembler on the VAX. On Alpha, itanic, and x86 is is =
> >a
> >> >> compiled language, and not anything you'd want to use on the non-VAX
> >> >> systems. Just ask John. It exists strictly for existing code.
> >> >>
> >> >=20
> >> > It's nothing to do with whether it's an assembler or a compiler.
> >>=20
> >> Both are merely semantics. Both are programs that take human
> >> readable input and generate machine runable object code.
> >>=20
> >> >=20
> >> > It's to do with the fact that assembly language is so low level
> >> > and error prone even when compared to C.
> >>=20
> >> The current MACRO-32 compiler can not be low level by any stretch
> >> of the imagination. I can not believe any VAX instruction would
> >> map directly and with the same semantics with the instruction set
> >> of the Alpha or the IA64. The same would be true for the x86-64.
>
> Of course not. Sheesh!
>
>
> >A single VAX instruction can be compiled into a _sequence_ of instructions =
> >for another machine. A single VAX MACRO ADDL3 instruction might become 4 i=
> >nstructions for a RISC machine: load, load, add, and store. Of course the =
> >sequence gets more complicated depending on the instruction, the addressing=
> > modes, etc.
>
> ... and it takes even more code to do it in C. Two equivalent simple adds:
>
[...]
Thanks for the illustration.
Yes, a lot of other code is emitted, but here that code is __MAIN
and function call/return overhead in both MAIN and GO. On the other
hand, you can imagine that there is additional code generated for
different VAX addressing modes, testing condition codes, more complicated
instructions, etc. But it's still the same computation that is being
performed.
More information about the Info-vax
mailing list