From: Richard Henderson <rth@twiddle.net>
To: axp-list@redhat.com
Subject: Re: tbia() on DEC 3000 question
Date: Mon, 16 Aug 1999 01:37:44 -0700 [thread overview]
Message-ID: <19990816013744.A8840@twiddle.net> (raw)
In-Reply-To: <199908160724.DAA04846@neptune.phys.ufl.edu>; from Craig P Prescott on Mon, Aug 16, 1999 at 03:24:38AM -0400
On Mon, Aug 16, 1999 at 03:24:38AM -0400, Craig P Prescott wrote:
> #define tbia() \
> ({ \
> register unsigned long __r16 __asm__("$16") = -2; \
> __asm__ __volatile__( \
> "call_pal 0x0033" \
> : \
> : \
> :"$1", "$16", "$17", "$22", "$23", "$24", "$25"); \
This doesn't make sense; __r16 is no longer used by the asm,
so the assignment should be optimized away, so $16 probably
now contains garbage.
> 2) why would the original tbia() fail on a DEC 3000 but work on
> everything else?
I have no idea. It doesn't make any sense for the PALcall
to fault at all.
> __tbi is generalized beyond the immediate needs of
> tbia() and tbiap(); could this be causing some problem?
I very much doubt it.
> P.S. This is a bit off-topic, but if someone could spell out in full detail
> __tbi above, I'd be grateful, as I could learn more from this
> example. I.e. what do the #__tbi and ##arg1 do?
Standard argument substitution from the macro -- # is stringification,
## is concatenation.
> And I learned from a
> gcc doc what the "=r" and "0" mean, but what about "i"?
Immediate.
> If one wanted to learn a bit of Alpha Assembly -
> with no prior knowledge of any assembly language - what would one do?
I study compiler output.
r~
next prev parent reply other threads:[~1999-08-16 8:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-16 7:24 tbia() on DEC 3000 question Craig P Prescott
1999-08-16 8:36 ` Wes Bauske
1999-08-16 8:50 ` Craig P Prescott
1999-08-16 8:37 ` Richard Henderson [this message]
1999-08-16 10:16 ` Craig P Prescott
1999-08-17 0:16 ` Richard Henderson
1999-08-18 9:36 ` Craig P Prescott
1999-08-18 9:35 ` Diagram for DEC3000 power supply Jason Irons
1999-08-18 23:49 ` tbia() on DEC 3000 question Richard Henderson
1999-08-19 18:45 ` Craig P Prescott
1999-08-19 23:02 ` Richard Henderson
1999-08-20 2:10 ` Ping all: DEC 3000 support question Ken Shiring
1999-08-20 7:11 ` Craig P Prescott
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox