public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC Assembler Modifiers
@ 2007-06-14 13:39 Mohamed Bamakhrama
  2007-06-14 13:40 ` Andrew Haley
  2007-06-14 14:41 ` Segher Boessenkool
  0 siblings, 2 replies; 5+ messages in thread
From: Mohamed Bamakhrama @ 2007-06-14 13:39 UTC (permalink / raw)
  To: gcc-help

Hi all,
I have two questions related to the modifiers that can be used with
operands in inline assembly.
1) What does the 'z' mean when added to the operand modifier (e.g. %z0)?
2) In the Input operands list, what is the meaning of 'J' (e.g. ... :
.... : "Jr" (0) )?

I tried to look them up in the online GCC manual but I couldn't find them.

Any help is highly appreciated.

Regards,

-- 
Mohamed Ahmed Bamakhrama
Am Schaeferanger 15, room 035
85764 Oberschleissheim, Germany
Email: bamakhra@cs.tum.edu
Web: http://home.cs.tum.edu/~bamakhra/
Mobile: +49-160-9349-2711

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

* Re: GCC Assembler Modifiers
  2007-06-14 13:39 GCC Assembler Modifiers Mohamed Bamakhrama
@ 2007-06-14 13:40 ` Andrew Haley
  2007-06-14 13:42   ` Mohamed Bamakhrama
  2007-06-14 14:41 ` Segher Boessenkool
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Haley @ 2007-06-14 13:40 UTC (permalink / raw)
  To: Mohamed Bamakhrama; +Cc: gcc-help

Mohamed Bamakhrama writes:

 > I have two questions related to the modifiers that can be used with
 > operands in inline assembly.
 > 1) What does the 'z' mean when added to the operand modifier (e.g. %z0)?

From i386.md:

;; The special asm out single letter directives following a '%' are:
;; 'z' mov%z1 would be movl, movw, or movb depending on the mode of
;;     operands[1].
;; 'L' Print the opcode suffix for a 32-bit integer opcode.
;; 'W' Print the opcode suffix for a 16-bit integer opcode.
;; 'B' Print the opcode suffix for an 8-bit integer opcode.
;; 'Q' Print the opcode suffix for a 64-bit float opcode.
;; 'S' Print the opcode suffix for a 32-bit float opcode.
;; 'T' Print the opcode suffix for an 80-bit extended real XFmode float opcode.
;; 'J' Print the appropriate jump operand.
;;

 > 2) In the Input operands list, what is the meaning of 'J' (e.g. ... :
 > .... : "Jr" (0) )?

See 14.8, Register Classes, in the gcc internals manual.

The machine-dependent operand constraint letters (`I', `J', `K',
... `P') specify particular ranges of integer values.

Also, see constraints.md:

(define_constraint "J"
  "Integer constant in the range 0 ... 63, for 64-bit shifts."
  (and (match_code "const_int")
       (match_test "IN_RANGE (ival, 0, 63)")))

Andrew.

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

* Re: GCC Assembler Modifiers
  2007-06-14 13:40 ` Andrew Haley
@ 2007-06-14 13:42   ` Mohamed Bamakhrama
  2007-06-14 15:49     ` Andrew Haley
  0 siblings, 1 reply; 5+ messages in thread
From: Mohamed Bamakhrama @ 2007-06-14 13:42 UTC (permalink / raw)
  To: Andrew Haley; +Cc: gcc-help

Thanks Andrew.
One more question, where do I find those .md files? I searched for
them but I couldn't find them in my GCC installation directory.

Regards,

On 6/14/07, Andrew Haley <aph-gcc@littlepinkcloud.com> wrote:
> Mohamed Bamakhrama writes:
>
>  > I have two questions related to the modifiers that can be used with
>  > operands in inline assembly.
>  > 1) What does the 'z' mean when added to the operand modifier (e.g. %z0)?
>
> From i386.md:
>
> ;; The special asm out single letter directives following a '%' are:
> ;; 'z' mov%z1 would be movl, movw, or movb depending on the mode of
> ;;     operands[1].
> ;; 'L' Print the opcode suffix for a 32-bit integer opcode.
> ;; 'W' Print the opcode suffix for a 16-bit integer opcode.
> ;; 'B' Print the opcode suffix for an 8-bit integer opcode.
> ;; 'Q' Print the opcode suffix for a 64-bit float opcode.
> ;; 'S' Print the opcode suffix for a 32-bit float opcode.
> ;; 'T' Print the opcode suffix for an 80-bit extended real XFmode float opcode.
> ;; 'J' Print the appropriate jump operand.
> ;;
>
>  > 2) In the Input operands list, what is the meaning of 'J' (e.g. ... :
>  > .... : "Jr" (0) )?
>
> See 14.8, Register Classes, in the gcc internals manual.
>
> The machine-dependent operand constraint letters (`I', `J', `K',
> ... `P') specify particular ranges of integer values.
>
> Also, see constraints.md:
>
> (define_constraint "J"
>   "Integer constant in the range 0 ... 63, for 64-bit shifts."
>   (and (match_code "const_int")
>        (match_test "IN_RANGE (ival, 0, 63)")))
>
> Andrew.
>


-- 
Mohamed Ahmed Bamakhrama
Am Schaeferanger 15, room 035
85764 Oberschleissheim, Germany
Email: bamakhra@cs.tum.edu
Web: http://home.cs.tum.edu/~bamakhra/
Mobile: +49-160-9349-2711

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

* Re: GCC Assembler Modifiers
  2007-06-14 13:39 GCC Assembler Modifiers Mohamed Bamakhrama
  2007-06-14 13:40 ` Andrew Haley
@ 2007-06-14 14:41 ` Segher Boessenkool
  1 sibling, 0 replies; 5+ messages in thread
From: Segher Boessenkool @ 2007-06-14 14:41 UTC (permalink / raw)
  To: bamakhrama; +Cc: gcc-help

> I have two questions related to the modifiers that can be used with
> operands in inline assembly.
> 1) What does the 'z' mean when added to the operand modifier (e.g. 
> %z0)?
> 2) In the Input operands list, what is the meaning of 'J' (e.g. ... :
> .... : "Jr" (0) )?
>
> I tried to look them up in the online GCC manual but I couldn't find 
> them.

You need the GCC internals manual instead, "info gccint".
Look at the "machine description" -> "constraints" ->
"machine constraints" section for the "J" thing.  I don't
know where the "%z" thing is documented, perhaps somewhere
in that manual, perhaps in the GCC source code only :-/


Segher

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

* Re: GCC Assembler Modifiers
  2007-06-14 13:42   ` Mohamed Bamakhrama
@ 2007-06-14 15:49     ` Andrew Haley
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Haley @ 2007-06-14 15:49 UTC (permalink / raw)
  To: Mohamed Bamakhrama; +Cc: gcc-help

Mohamed Bamakhrama writes:
 > Thanks Andrew.
 > One more question, where do I find those .md files? I searched for
 > them but I couldn't find them in my GCC installation directory.

Please don't top-post.

They're in the gcc source, in gcc/config/i386/

Andrew.

 > On 6/14/07, Andrew Haley <aph-gcc@littlepinkcloud.com> wrote:
 > > Mohamed Bamakhrama writes:
 > >
 > >  > I have two questions related to the modifiers that can be used with
 > >  > operands in inline assembly.
 > >  > 1) What does the 'z' mean when added to the operand modifier (e.g. %z0)?
 > >
 > > From i386.md:
 > >
 > > ;; The special asm out single letter directives following a '%' are:
 > > ;; 'z' mov%z1 would be movl, movw, or movb depending on the mode of
 > > ;;     operands[1].
 > > ;; 'L' Print the opcode suffix for a 32-bit integer opcode.
 > > ;; 'W' Print the opcode suffix for a 16-bit integer opcode.
 > > ;; 'B' Print the opcode suffix for an 8-bit integer opcode.
 > > ;; 'Q' Print the opcode suffix for a 64-bit float opcode.
 > > ;; 'S' Print the opcode suffix for a 32-bit float opcode.
 > > ;; 'T' Print the opcode suffix for an 80-bit extended real XFmode float opcode.
 > > ;; 'J' Print the appropriate jump operand.
 > > ;;
 > >
 > >  > 2) In the Input operands list, what is the meaning of 'J' (e.g. ... :
 > >  > .... : "Jr" (0) )?
 > >
 > > See 14.8, Register Classes, in the gcc internals manual.
 > >
 > > The machine-dependent operand constraint letters (`I', `J', `K',
 > > ... `P') specify particular ranges of integer values.
 > >
 > > Also, see constraints.md:
 > >
 > > (define_constraint "J"
 > >   "Integer constant in the range 0 ... 63, for 64-bit shifts."
 > >   (and (match_code "const_int")
 > >        (match_test "IN_RANGE (ival, 0, 63)")))
 > >
 > > Andrew.

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

end of thread, other threads:[~2007-06-14 13:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-14 13:39 GCC Assembler Modifiers Mohamed Bamakhrama
2007-06-14 13:40 ` Andrew Haley
2007-06-14 13:42   ` Mohamed Bamakhrama
2007-06-14 15:49     ` Andrew Haley
2007-06-14 14:41 ` Segher Boessenkool

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).