Thread overview | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
April 07, 2003 inline asm again | ||||
---|---|---|---|---|
| ||||
Another small problem: the inline assembler doesn't support the "xmmword ptr [x]" construct. movdqa xmm0, xmmword ptr [eax] I tried dqword ptr also; no dice. Is there an alternative or does this just need added? Sean |
April 08, 2003 Re: inline asm again | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer |
> movdqa xmm0, xmmword ptr [eax]
>
> I tried dqword ptr also; no dice. Is there an alternative or does this just need added?
How about "oword" (octa-word), as it was in the VAX assembly?
|
April 08, 2003 Re: inline asm again | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:b6qldj$km5$1@digitaldaemon.com... > Another small problem: the inline assembler doesn't support the "xmmword ptr [x]" construct. > > movdqa xmm0, xmmword ptr [eax] > > I tried dqword ptr also; no dice. Is there an alternative or does this just need added? movdqa xmm0, [eax] |
April 08, 2003 Re: inline asm again | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Already found that. I think it's great that you don't have to use dword ptr etc; it's inferred from the register's size. It's just not standard Intel asm syntax. dword ptr works, xmmword ptr doesn't. I can't think of a reason why you'd ever need the 'byte ptr' syntax anyway. It's entirely redundant, no? I guess if you have a macro that moves memory to memory or something you might need it. Sean "Walter" <walter@digitalmars.com> wrote in message news:b6tto4$1bmh$1@digitaldaemon.com... > > "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:b6qldj$km5$1@digitaldaemon.com... > > Another small problem: the inline assembler doesn't support the "xmmword > > ptr [x]" construct. > > > > movdqa xmm0, xmmword ptr [eax] > > > > I tried dqword ptr also; no dice. Is there an alternative or does this just need added? > > movdqa xmm0, [eax] |
April 08, 2003 Re: inline asm again | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:b6usdl$22g2$1@digitaldaemon.com... > Already found that. I think it's great that you don't have to use dword ptr > etc; it's inferred from the register's size. It's just not standard Intel > asm syntax. dword ptr works, xmmword ptr doesn't. > > I can't think of a reason why you'd ever need the 'byte ptr' syntax anyway. > It's entirely redundant, no? I guess if you have a macro that moves memory > to memory or something you might need it. It's needed to distinguish: cmp [EAX],0 is it a byte, word or dword operation? |
April 09, 2003 Re: inline asm again | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Ah yes. Well there are no immediate operands for XMM registers. So the only issue really is consistency. Sean "Walter" <walter@digitalmars.com> wrote in message news:b6v844$2b4q$1@digitaldaemon.com... > > "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:b6usdl$22g2$1@digitaldaemon.com... > > I can't think of a reason why you'd ever need the 'byte ptr' syntax > anyway. > > It's entirely redundant, no? I guess if you have a macro that moves > memory > > to memory or something you might need it. > > It's needed to distinguish: > > cmp [EAX],0 > > is it a byte, word or dword operation? |
April 09, 2003 Re: inline asm again | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | The syntax is a poor choice, a better one would have been: cmpb [EAX],0 cmpw [EAX],0 cmpd [EAX],0 but oh well, the xxx ptr thing is how Intel did it. "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:b708vd$5n$1@digitaldaemon.com... > Ah yes. Well there are no immediate operands for XMM registers. So the only issue really is consistency. > > Sean > > "Walter" <walter@digitalmars.com> wrote in message news:b6v844$2b4q$1@digitaldaemon.com... > > > > "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:b6usdl$22g2$1@digitaldaemon.com... > > > I can't think of a reason why you'd ever need the 'byte ptr' syntax > > anyway. > > > It's entirely redundant, no? I guess if you have a macro that moves > > memory > > > to memory or something you might need it. > > > > It's needed to distinguish: > > > > cmp [EAX],0 > > > > is it a byte, word or dword operation? > > |
April 10, 2003 Re: inline asm again | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | I agree. The Motorola way looks nicer. Out of curiosity, do you have any plans to support SIMD registers as intrinsic types, with intrinsic functions representing the XMM opcodes? See <xmmintrin.h> in the VC6 Processor Pack for an example of how MS/Intel did it. I just heard the new SN compiler for PS2 has intrinsics for its SIMD capabilities. It seems the right way to handle this stuff. Then the compiler can do what it does best... register allocation and pipelining. The first step is done; inline asm support for the registers and instruction types. The intrinsics are just the second step. They allow us programmers to access the low level machine types without resorting to asm any more than we have to. The next step is having the compiler emit SIMD automatically thru unrolling loops or thru array operations. Sean "Walter" <walter@digitalmars.com> wrote in message news:b70k2m$8e1$1@digitaldaemon.com... > The syntax is a poor choice, a better one would have been: > > cmpb [EAX],0 > cmpw [EAX],0 > cmpd [EAX],0 > > but oh well, the xxx ptr thing is how Intel did it. > > "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:b708vd$5n$1@digitaldaemon.com... > > Ah yes. Well there are no immediate operands for XMM registers. So the only issue really is consistency. > > > > Sean |
April 12, 2003 Re: inline asm again | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | you need it for.. movzx eax, [???] is that a zero extended word or a zero extended byte? chris "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:b6usdl$22g2$1@digitaldaemon.com... > Already found that. I think it's great that you don't have to use dword ptr > etc; it's inferred from the register's size. It's just not standard Intel > asm syntax. dword ptr works, xmmword ptr doesn't. > > I can't think of a reason why you'd ever need the 'byte ptr' syntax anyway. > It's entirely redundant, no? I guess if you have a macro that moves memory > to memory or something you might need it. > > Sean > > "Walter" <walter@digitalmars.com> wrote in message news:b6tto4$1bmh$1@digitaldaemon.com... > > > > "Sean L. Palmer" <palmer.sean@verizon.net> wrote in message news:b6qldj$km5$1@digitaldaemon.com... > > > Another small problem: the inline assembler doesn't support the > "xmmword > > > ptr [x]" construct. > > > > > > movdqa xmm0, xmmword ptr [eax] > > > > > > I tried dqword ptr also; no dice. Is there an alternative or does this > > > just need added? > > > > movdqa xmm0, [eax] > > |
Copyright © 1999-2021 by the D Language Foundation