Port-vax archive

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

Re: Some more patches for GCC on NetBSD/VAX coming soon...



On Thu 31 Mar 2016 at 21:24:04 -0700, Jake Hamby wrote:
> On VAX, you might be able to do the same thing if there's a
> particularly long instruction that's an effective nop and is faster to
> execute than the number of bytes it is.

Is there any mechanism in gcc to jump into the middle of an instruction
which is (effectively) a nop when executed from the start, but which can
be mostly any (shorter) instruction when entered somewhere in the
middle?

It's a common technique on 8-bitters such as the 6502, to avoid extra
branches:

	cmp #42
	beq label
	lda #1
	.byte $2C   ; opcode for a 3-byte instruction that doesn't do much,
		    ; usually the BIT abs instruction that only changes
		    ; condition codes
label:	lda #2	    ; a 2-byte instruction
	...

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl    -- 'this bath is too hot.'

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index