public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* new asembler command for AVR port
@ 2006-06-21 15:23 Piotr Pałka
  0 siblings, 0 replies; 2+ messages in thread
From: Piotr Pałka @ 2006-06-21 15:23 UTC (permalink / raw)
  To: gcc-help

Hello, 

I need to add one asembler command to AVR port. It could be anything.
Maybe somebody can tell me how to do that? Which file/s I need to change? Do
I need to change some files in binutils?
I think this is quite easy to do.

Thanks in advance.

Best regards,
Piotr Pałka

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: new asembler command for AVR port
@ 2006-06-21 15:44 john.gill
  0 siblings, 0 replies; 2+ messages in thread
From: john.gill @ 2006-06-21 15:44 UTC (permalink / raw)
  To: Piotr.Palka, gcc-help

Two ways maybe:

1: Change binutils. Get hold of binutils source tree and take a look
avr.h. For the binutils-2.15 this looks like:  

./binutils-2.15/include/opcode/avr.h 

Assembler commands are defined 
in the macro AVR_INSN in terms of 16bit opcode, avr port etc. This header shows which
bits of the opcode space are unused.

2: You may be able to just hack an opcode together by just using the gas .hword command
to define your new insn?
eg. In C,

asm volatile (".hword 0xB00B\n");

or in asm in text section.

	.hword 0xB00B


Cheers 

John
-----Original Message-----
From: Piotr Palka [mailto:Piotr.Palka@ascen.pl]
Sent: 21 June 2006 16:24
To: 
Subject: new asembler command for AVR port


Hello, 

I need to add one asembler command to AVR port. It could be anything.
Maybe somebody can tell me how to do that? Which file/s I need to change? Do
I need to change some files in binutils?
I think this is quite easy to do.

Thanks in advance.

Best regards,
Piotr Pałka

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-21 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-21 15:23 new asembler command for AVR port Piotr Pałka
2006-06-21 15:44 john.gill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).