This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: H' hex constants
- From: "Cecilia Rodrigues" <Cecilia dot Rodrigues at kpitcummins dot com>
- To: <binutils at sourceware dot org>
- Cc: <dj at redhat dot com>, "Prafulla Thakare" <Prafulla dot Thakare at kpitcummins dot com>
- Date: Mon, 4 Aug 2008 15:26:08 +0530
- Subject: Re: H' hex constants
Hi,
I built the M16C toolchain using the following sources,
- Binutils-2.18.50 (30-July-08)
- GCC-4.3.1 and
- Newlib-1.16.0
These sources has the patch for M16C. It fixes the compilation errors
for the following statements:
asm("MOV.B #'Z,R0L");
asm("MOV.W #'10,R0");
asm("LDC #'0080,FLG");
asm("LDC '0080,FLG");
As per our understanding the following test cases should also
compile successfully,
Test case 1 :
int main()
{
asm("TST.W #H'03,R0");
return 0;
}
However, this test case generates the following error:
/tmp/cce6BJxp.s: Assembler messages:
/tmp/cce6BJxp.s:0: Warning: '0 found after symbol
/tmp/ccFx0hUI.o: In function `_main':
m16c.c:(.text+0x2): undefined reference to `H483'
collect2: ld returned 1 exit status
Command used:
m32c-elf-gcc -mcpu=m16c -msim test.c -h-tick-hex
Test case 2 :
int main()
{
asm("LDC H'0080,FLG");
return 0;
}
Error:
/tmp/ccY6t09b.s: Assembler messages:
/tmp/ccY6t09b.s:0: Warning: '0 found after symbol
/tmp/ccCMhFAh.o: In function `_main':
test2.c:(.text+0x2): undefined reference to `H48080'
collect2: ld returned 1 exit status
Command used:
m32c-elf-gcc test2.c -mcpu=m16c -msim -h-tick-hex
3. Also, we have observed that, there is no change to above test cases
with and without '-h-tick-hex' option for M16C.
Please comment.
Regards,
Cecilia Rodrigues
KPIT Cummins InfoSystems Ltd.
Pune, India