This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

2.95/3.x regression in the compilation of computed gotos?


Guys,

I'd like to get your opinion on the difference in how gcc 2.95 and
3.3.2 compile the line of code below (where PC has type void**):

	goto ** (PC += 1);

2.95:

	addl $4,%eax
        jmp *(%eax)

3.3.2:

	addl $4,%ecx
        movl (%ecx),%edx
        jmp *%edx

Isn't this a regression?

I attach below the short program used to illustrate this difference.
It reflects in a simplified manner what happens in our emulator for
mozart/oz threaded bytecode.

Attachment: foo.cc
Description: test program

Cheers,

-- 
Denys Duchier - Équipe Calligramme - LORIA, Nancy, France

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]