public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/ibuclaw/heads/darwin)] libphobos: Use raw byte sequence instead of xgetbv
@ 2021-01-28 17:31 Iain Buclaw
  0 siblings, 0 replies; 7+ messages in thread
From: Iain Buclaw @ 2021-01-28 17:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:fc04827f4539d61f299391e9f946292bce7418fa

commit fc04827f4539d61f299391e9f946292bce7418fa
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Thu Dec 3 23:52:11 2020 +0100

    libphobos: Use raw byte sequence instead of xgetbv

Diff:
---
 libphobos/libdruntime/core/cpuid.d | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libphobos/libdruntime/core/cpuid.d b/libphobos/libdruntime/core/cpuid.d
index 2ba13b55bf1..109fd3b9efc 100644
--- a/libphobos/libdruntime/core/cpuid.d
+++ b/libphobos/libdruntime/core/cpuid.d
@@ -771,7 +771,10 @@ void cpuidX86()
     if (cf.miscfeatures & OSXSAVE_BIT)
     {
         version (GNU) asm pure nothrow @nogc {
-            "xgetbv" : "=a" (a), "=d" (d) : "c" (0);
+            /* Old assemblers do not recognize xgetbv, and there is no easy way
+             * to conditionally compile based on the assembler used, so use the
+             * raw .byte sequence instead.  */
+            ".byte 0x0f, 0x01, 0xd0" : "=a" (a), "=d" (d) : "c" (0);
         } else asm pure nothrow @nogc {
             mov ECX, 0;
             xgetbv;


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

* [gcc(refs/users/ibuclaw/heads/darwin)] libphobos: Use raw byte sequence instead of xgetbv
@ 2021-01-30 19:08 Iain Buclaw
  0 siblings, 0 replies; 7+ messages in thread
From: Iain Buclaw @ 2021-01-30 19:08 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2ab6f8177afe1dd0a779fae599370ef79a4bc893

commit 2ab6f8177afe1dd0a779fae599370ef79a4bc893
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Thu Dec 3 23:52:11 2020 +0100

    libphobos: Use raw byte sequence instead of xgetbv

Diff:
---
 libphobos/libdruntime/core/cpuid.d | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libphobos/libdruntime/core/cpuid.d b/libphobos/libdruntime/core/cpuid.d
index 2ba13b55bf1..109fd3b9efc 100644
--- a/libphobos/libdruntime/core/cpuid.d
+++ b/libphobos/libdruntime/core/cpuid.d
@@ -771,7 +771,10 @@ void cpuidX86()
     if (cf.miscfeatures & OSXSAVE_BIT)
     {
         version (GNU) asm pure nothrow @nogc {
-            "xgetbv" : "=a" (a), "=d" (d) : "c" (0);
+            /* Old assemblers do not recognize xgetbv, and there is no easy way
+             * to conditionally compile based on the assembler used, so use the
+             * raw .byte sequence instead.  */
+            ".byte 0x0f, 0x01, 0xd0" : "=a" (a), "=d" (d) : "c" (0);
         } else asm pure nothrow @nogc {
             mov ECX, 0;
             xgetbv;


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

* [gcc(refs/users/ibuclaw/heads/darwin)] libphobos: Use raw byte sequence instead of xgetbv
@ 2021-01-11 11:39 Iain Buclaw
  0 siblings, 0 replies; 7+ messages in thread
From: Iain Buclaw @ 2021-01-11 11:39 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:580ad7746983e73c1453039ee87b876de6f4d711

commit 580ad7746983e73c1453039ee87b876de6f4d711
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Thu Dec 3 23:52:11 2020 +0100

    libphobos: Use raw byte sequence instead of xgetbv

Diff:
---
 libphobos/libdruntime/core/cpuid.d | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libphobos/libdruntime/core/cpuid.d b/libphobos/libdruntime/core/cpuid.d
index 2ba13b55bf1..109fd3b9efc 100644
--- a/libphobos/libdruntime/core/cpuid.d
+++ b/libphobos/libdruntime/core/cpuid.d
@@ -771,7 +771,10 @@ void cpuidX86()
     if (cf.miscfeatures & OSXSAVE_BIT)
     {
         version (GNU) asm pure nothrow @nogc {
-            "xgetbv" : "=a" (a), "=d" (d) : "c" (0);
+            /* Old assemblers do not recognize xgetbv, and there is no easy way
+             * to conditionally compile based on the assembler used, so use the
+             * raw .byte sequence instead.  */
+            ".byte 0x0f, 0x01, 0xd0" : "=a" (a), "=d" (d) : "c" (0);
         } else asm pure nothrow @nogc {
             mov ECX, 0;
             xgetbv;


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

* [gcc(refs/users/ibuclaw/heads/darwin)] libphobos: Use raw byte sequence instead of xgetbv
@ 2020-12-22 13:40 Iain Buclaw
  0 siblings, 0 replies; 7+ messages in thread
From: Iain Buclaw @ 2020-12-22 13:40 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:5629fd368f53a181177d0a82a22ec4c0789f367e

commit 5629fd368f53a181177d0a82a22ec4c0789f367e
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Thu Dec 3 23:52:11 2020 +0100

    libphobos: Use raw byte sequence instead of xgetbv

Diff:
---
 libphobos/libdruntime/core/cpuid.d | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libphobos/libdruntime/core/cpuid.d b/libphobos/libdruntime/core/cpuid.d
index 2ba13b55bf1..109fd3b9efc 100644
--- a/libphobos/libdruntime/core/cpuid.d
+++ b/libphobos/libdruntime/core/cpuid.d
@@ -771,7 +771,10 @@ void cpuidX86()
     if (cf.miscfeatures & OSXSAVE_BIT)
     {
         version (GNU) asm pure nothrow @nogc {
-            "xgetbv" : "=a" (a), "=d" (d) : "c" (0);
+            /* Old assemblers do not recognize xgetbv, and there is no easy way
+             * to conditionally compile based on the assembler used, so use the
+             * raw .byte sequence instead.  */
+            ".byte 0x0f, 0x01, 0xd0" : "=a" (a), "=d" (d) : "c" (0);
         } else asm pure nothrow @nogc {
             mov ECX, 0;
             xgetbv;


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

* [gcc(refs/users/ibuclaw/heads/darwin)] libphobos: Use raw byte sequence instead of xgetbv
@ 2020-12-09  9:50 Iain Buclaw
  0 siblings, 0 replies; 7+ messages in thread
From: Iain Buclaw @ 2020-12-09  9:50 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:bba9ec13894b9c4a1a4391ca04c0e553be5c0e69

commit bba9ec13894b9c4a1a4391ca04c0e553be5c0e69
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Thu Dec 3 23:52:11 2020 +0100

    libphobos: Use raw byte sequence instead of xgetbv

Diff:
---
 libphobos/libdruntime/core/cpuid.d | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libphobos/libdruntime/core/cpuid.d b/libphobos/libdruntime/core/cpuid.d
index 2ba13b55bf1..109fd3b9efc 100644
--- a/libphobos/libdruntime/core/cpuid.d
+++ b/libphobos/libdruntime/core/cpuid.d
@@ -771,7 +771,10 @@ void cpuidX86()
     if (cf.miscfeatures & OSXSAVE_BIT)
     {
         version (GNU) asm pure nothrow @nogc {
-            "xgetbv" : "=a" (a), "=d" (d) : "c" (0);
+            /* Old assemblers do not recognize xgetbv, and there is no easy way
+             * to conditionally compile based on the assembler used, so use the
+             * raw .byte sequence instead.  */
+            ".byte 0x0f, 0x01, 0xd0" : "=a" (a), "=d" (d) : "c" (0);
         } else asm pure nothrow @nogc {
             mov ECX, 0;
             xgetbv;


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

* [gcc(refs/users/ibuclaw/heads/darwin)] libphobos: Use raw byte sequence instead of xgetbv
@ 2020-12-05 23:47 Iain Buclaw
  0 siblings, 0 replies; 7+ messages in thread
From: Iain Buclaw @ 2020-12-05 23:47 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:5c171092c78b616f22412720dc68259d541383e0

commit 5c171092c78b616f22412720dc68259d541383e0
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Thu Dec 3 23:52:11 2020 +0100

    libphobos: Use raw byte sequence instead of xgetbv

Diff:
---
 libphobos/libdruntime/core/cpuid.d | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libphobos/libdruntime/core/cpuid.d b/libphobos/libdruntime/core/cpuid.d
index 2ba13b55bf1..109fd3b9efc 100644
--- a/libphobos/libdruntime/core/cpuid.d
+++ b/libphobos/libdruntime/core/cpuid.d
@@ -771,7 +771,10 @@ void cpuidX86()
     if (cf.miscfeatures & OSXSAVE_BIT)
     {
         version (GNU) asm pure nothrow @nogc {
-            "xgetbv" : "=a" (a), "=d" (d) : "c" (0);
+            /* Old assemblers do not recognize xgetbv, and there is no easy way
+             * to conditionally compile based on the assembler used, so use the
+             * raw .byte sequence instead.  */
+            ".byte 0x0f, 0x01, 0xd0" : "=a" (a), "=d" (d) : "c" (0);
         } else asm pure nothrow @nogc {
             mov ECX, 0;
             xgetbv;


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

* [gcc(refs/users/ibuclaw/heads/darwin)] libphobos: Use raw byte sequence instead of xgetbv
@ 2020-12-03 22:57 Iain Buclaw
  0 siblings, 0 replies; 7+ messages in thread
From: Iain Buclaw @ 2020-12-03 22:57 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ddb7a490fefffac1bf3456926d529ab4883c11aa

commit ddb7a490fefffac1bf3456926d529ab4883c11aa
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Thu Dec 3 23:52:11 2020 +0100

    libphobos: Use raw byte sequence instead of xgetbv

Diff:
---
 libphobos/libdruntime/core/cpuid.d | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libphobos/libdruntime/core/cpuid.d b/libphobos/libdruntime/core/cpuid.d
index 2ba13b55bf1..109fd3b9efc 100644
--- a/libphobos/libdruntime/core/cpuid.d
+++ b/libphobos/libdruntime/core/cpuid.d
@@ -771,7 +771,10 @@ void cpuidX86()
     if (cf.miscfeatures & OSXSAVE_BIT)
     {
         version (GNU) asm pure nothrow @nogc {
-            "xgetbv" : "=a" (a), "=d" (d) : "c" (0);
+            /* Old assemblers do not recognize xgetbv, and there is no easy way
+             * to conditionally compile based on the assembler used, so use the
+             * raw .byte sequence instead.  */
+            ".byte 0x0f, 0x01, 0xd0" : "=a" (a), "=d" (d) : "c" (0);
         } else asm pure nothrow @nogc {
             mov ECX, 0;
             xgetbv;


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

end of thread, other threads:[~2021-01-30 19:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 17:31 [gcc(refs/users/ibuclaw/heads/darwin)] libphobos: Use raw byte sequence instead of xgetbv Iain Buclaw
  -- strict thread matches above, loose matches on Subject: below --
2021-01-30 19:08 Iain Buclaw
2021-01-11 11:39 Iain Buclaw
2020-12-22 13:40 Iain Buclaw
2020-12-09  9:50 Iain Buclaw
2020-12-05 23:47 Iain Buclaw
2020-12-03 22:57 Iain Buclaw

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