From: Mitch D. <md...@po...> - 2000-09-29 17:53:33
|
NIIBE Yutaka wrote: > > Support "syscall" syscall and assembler change. The register name > in the input/output/clobber list, no "$" would be correct. Hi Niibe-san, A couple of months ago, registers did not have dollar signs on the front. But then the decision was made to add dollars (which I think is a good idea). For a while we had code with both styles, but we got that sorted out. Now I see code without dollars again - sometimes. Looking at your mail, this code keeps its dollar: > "mov $r0, $r4\n\t" /* return value to arg of exit */ > - "mov %2, $r3\n\t" /* exit */ > + "mov %1, $r3\n\t" /* exit */ > "trapa #0x11\n" This code does not: > { > - register long r0 __asm__("$r0") = func; > - register long r4 __asm__("$r4") = arg0; > - register long r5 __asm__("$r5") = arg1; > - register long r6 __asm__("$r6") = arg2; > - register long r7 __asm__("$r7") = arg3; > + register long r0 __asm__("r0") = func; > + register long r4 __asm__("r4") = arg0; > + register long r5 __asm__("r5") = arg1; > + register long r6 __asm__("r6") = arg2; > + register long r7 __asm__("r7") = arg3; > __asm__ __volatile__("trapa #0x3f" I am very confused. I am not questioning your wisdom, but I do wish I knew what the rationale is - when should one use a dollar, when should one not, and what should we do in the future. Regards, Mitch. |