samiam95124 / Pascal-P6

6th version of Niklaus Wirth's original Pascal language compiler system
Other
28 stars 9 forks source link

Short instructions #146

Open samiam95124 opened 5 months ago

samiam95124 commented 5 months ago

A short form of the instructions for load, store, and jumps will be introduced

The existing situation

At present all instructions involving an address are given at the full word size of the machine, which can be 16, 32 or 64 bits (and could potentially be larger).

The proposal

We introduce a byte offset form for loads, stores and true/false/always jumps. The offset would be in the form -128..127, IE, a signed byte. These instructions are the existing instructions with a "s" for short/signed postfix. They are entirely contained in pint/pmach/cmach, that is, they don't appear in the intermediate.

Note

This was done and tested previously. The instruction space savings was a few percent. IE, not stunning, but not zero in any case.