9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] 8a/8l bug
@ 2003-12-17 17:59 Latchesar Ionkov
  2003-12-17 19:26 ` Latchesar Ionkov
  0 siblings, 1 reply; 8+ messages in thread
From: Latchesar Ionkov @ 2003-12-17 17:59 UTC (permalink / raw)
  To: 9fans

Hi,

I am working on making gcc to support the standard Plan9 object format. I
noticed something that IMO is a bug.

If I try to compile:

TEXT	main(SB), $0
	ADDL	$-1, AX
	ADCL	$-1, DX
	RET

the result from

	8l -a t.8
is:

001020  (1)	TEXT	main+0(SB),$0
001020 48	(2)	SUBL	$1, AX
001021 83d2ff	(3)	ADCL	$-1, DX

According to my ia32 instruction set reference 0x48 is
	DECL AX

not
	SUBL $1, AX

Unlike SUBL, DECL doesn't change CF flag, so the ADCL instruction is not
working correctly.

Where are these types of optimizations made? Is it possible to turn them off
completely?

Thanks,
	Lucho



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-12-18  4:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-17 17:59 [9fans] 8a/8l bug Latchesar Ionkov
2003-12-17 19:26 ` Latchesar Ionkov
2003-12-17 22:54   ` Russ Cox
2003-12-17 23:33     ` Latchesar Ionkov
2003-12-17 23:38       ` Russ Cox
2003-12-18  0:13         ` Latchesar Ionkov
2003-12-18  0:25         ` Charles Forsyth
2003-12-18  4:54   ` jmk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).