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

Re: Has anyone successfully bootstrapped gcc-4.6.3 on m68k?



On 28/05/2012 14:06, t-rexky wrote:
	lsll #2,d0
	movel pc@(L8,d0:l),d0
	movel d0,a0
	jmp a0@
	.const
	.align 1
L8:
	.long L2
	.long L3
	.long L4
	.long L5
	.long L6
	.long L7
	.text
L3:

On my m68k-atari-mint port, the code generated by GCC is a bit different.
Especially, I don't have those lines:
.const
.align 1
...
.text

That's quite surprising because I can't find that ".const" directive in the gas manual. I don't know what it does. But if the goal of that directive would be to change the output section, the generated code may be wrong, due to PC-relative addressing.

I suspect you have that ".const" somewhere in your configuration file, maybe in the ASM_OUTPUT_CASE_END macro. If this is the case, try to remove that.

See the documentation there:
http://gcc.gnu.org/onlinedocs/gccint/Dispatch-Tables.html

Also, the following define is probably mandatory if your target allows a separate read-only data section :

#define JUMP_TABLES_IN_TEXT_SECTION 1

See there:
http://gcc.gnu.org/onlinedocs/gccint/Sections.html#index-JUMP_005fTABLES_005fIN_005fTEXT_005fSECTION-4432

Good luck.

NB: From the two macros above, JUMP_TABLES_IN_TEXT_SECTION is probably the closest to your solution.

--
Vincent Rivière


Reply to: