This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Add LWP support for upcoming AMD Orochi processor.
On Fri, Dec 11, 2009 at 02:51:14PM -0600, Sebastian Pop wrote:
> On Fri, Dec 11, 2009 at 08:50, Jakub Jelinek <jakub@redhat.com> wrote:
> > Here is roughly what I meant (your 3 patches combined, adjusted by me).
>
> Thanks for the patch.
>
> I have discussed with other people internally and they highly
> recommended that we do not define the intrinsics for llwpcb and slwpcb
> as "void const *", but just "void *" as the address of the PCB is
> susceptible to be changed by the hardware. See attached patch on top
> of yours.
Sure, I've been wondering about that myself too. That change looks good to
me.
Are those other people ok with the lwpintrin.h changes (primarily only
one intrinsics without number instead of 3 for llwpcb/slwpcb)?
Is the return value from __lwpins the expected one (i.e. setc %al rather
than say setnc %al)?
I've briefly looked at the lengths of lwpins and lwpval insns and
the following worked well in all cases I've tried.
If you are ok with these, can you combine the 3 patches posted today,
write ChangeLog, test it and submit?
OT, wonder why x86-64-lwp.[sd] in gas testsuite only tests addr32 modes,
which are very unlikely to occur in 64-bit code, and not normal addresses
with 64-bit base/index registers.
--- gcc/config/i386/i386.md.jj 2009-12-11 15:38:16.000000000 +0100
+++ gcc/config/i386/i386.md 2009-12-11 22:26:42.000000000 +0100
@@ -20889,7 +20889,8 @@ (define_insn "*lwp_lwpval<mode>3_1"
"lwpval\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "lwp")
(set_attr "mode" "<MODE>")
- (set_attr "length" "9")])
+ (set (attr "length")
+ (symbol_ref "ix86_attr_length_address_default (insn) + 9"))])
(define_expand "lwp_lwpins<mode>3"
[(set (reg:CCC FLAGS_REG)
@@ -20912,7 +20913,8 @@ (define_insn "*lwp_lwpins<mode>3_1"
"lwpins\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "type" "lwp")
(set_attr "mode" "<MODE>")
- (set_attr "length" "9")])
+ (set (attr "length")
+ (symbol_ref "ix86_attr_length_address_default (insn) + 9"))])
(include "mmx.md")
(include "sse.md")
Jakub