How to get label address in asm?

B

Bryan

Hello,
I have a questin about the getting for the label address.Cpu is
ppc8260,compiler is gcc2.76.
If I want get the address of the label in embedding asm,how should I
do? I can get the low 16 bit and high 16 bit respectively just as
follow,then make a 32 bit value.

__asm__ (" \
lis 29, 5f@h \n\
lis 28, 5f@l \n\
...
...
5:
...
...
I think it is not a good method.Have a good method to get the label
address more simply?

Sincerely
Bryan
 
J

Joona I Palaste

Bryan said:
Hello,
I have a questin about the getting for the label address.Cpu is
ppc8260,compiler is gcc2.76.

What strange contraption gave you the curious misconception that this
would have the slightest, most vague, most remote bit to do with C?
C has absolutely *NO* ties whatsoever to assembler, or to any other
language for that matter. C is defined in terms of itself.
Anyway if you feel the need to specify which CPU you are using (or even
the fact that you are using a CPU at all), you're already hopelessly
off-topic here.

--
/-- Joona Palaste ([email protected]) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"All that flower power is no match for my glower power!"
- Montgomery Burns
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top