https://github.com/diggerlin closed
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/amy-kwan approved this pull request.
I don't have any further comments. LGTM.
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/lei137 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH 1/8] Implement a subset of builtin_cpu_supports() features
---
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 -triple powerpc-ibm-aix7.2.0.0 -emit-llvm -o - %s |
FileCheck %s
+
+int main() {
+ int ret = 0;
+ ret += __builtin_cpu_supports("vsx");
+ ret += __builtin_cpu_supports("htm");
+ ret += __builtin_cpu_supports("cellbe");
+ ret +=
@@ -141,46 +149,98 @@ PPC_LNX_CPU("power10",47)
#define AIX_BUILTIN_PPC_TRUE 1
#define AIX_BUILTIN_PPC_FALSE 0
#define USE_SYS_CONF 2
-
- // Supported COMPARE_OP values.
- #define COMP_EQ 0
-
+ #define SYS_CALL 3
#endif
// The value of SUPPORT_METHOD can be
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH 1/7] Implement a subset of builtin_cpu_supports() features
---
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH 1/6] Implement a subset of builtin_cpu_supports() features
---
@@ -16570,32 +16570,53 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned
BuiltinID,
#include "llvm/TargetParser/PPCTargetParser.def"
auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx,
- unsigned CompOp,
+
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH 1/5] Implement a subset of builtin_cpu_supports() features
---
@@ -141,46 +149,98 @@ PPC_LNX_CPU("power10",47)
#define AIX_BUILTIN_PPC_TRUE 1
#define AIX_BUILTIN_PPC_FALSE 0
#define USE_SYS_CONF 2
-
- // Supported COMPARE_OP values.
- #define COMP_EQ 0
-
+ #define SYS_CALL 3
#endif
// The value of SUPPORT_METHOD can be
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH 1/4] Implement a subset of builtin_cpu_supports() features
---
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -364,7 +364,14 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public
TargetInfo {
// have Glibc since it is Glibc that provides the HWCAP[2] in the auxv.
static constexpr int MINIMUM_AIX_OS_MAJOR = 7;
static constexpr int MINIMUM_AIX_OS_MINOR = 2;
- bool
@@ -141,23 +149,30 @@ PPC_LNX_CPU("power10",47)
#define AIX_BUILTIN_PPC_TRUE 1
#define AIX_BUILTIN_PPC_FALSE 0
#define USE_SYS_CONF 2
+ #define SYS_CALL 3
// Supported COMPARE_OP values.
#define COMP_EQ 0
+ #define COMP_GT 1
+ #define COMP_GE 2
+ #define
@@ -0,0 +1,171 @@
+// RUN: echo "int main() { return __builtin_cpu_supports(\"4xxmac\");}" > %t.c
nemanjai wrote:
This is an interesting way of testing, where we create each test on the fly. I
am not against it if it works on all platforms (including Windows).
@@ -16570,32 +16570,72 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned
BuiltinID,
#include "llvm/TargetParser/PPCTargetParser.def"
auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx,
nemanjai wrote:
This is now a very
@@ -141,23 +149,30 @@ PPC_LNX_CPU("power10",47)
#define AIX_BUILTIN_PPC_TRUE 1
#define AIX_BUILTIN_PPC_FALSE 0
#define USE_SYS_CONF 2
+ #define SYS_CALL 3
// Supported COMPARE_OP values.
#define COMP_EQ 0
+ #define COMP_GT 1
+ #define COMP_GE 2
+ #define
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH 1/2] Implement a subset of builtin_cpu_supports() features
---
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From 557e7163d744890aadfa703a81a0c4f2cd112517 Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH] Implement a subset of builtin_cpu_supports() features
---
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH 1/8] Implement a subset of builtin_cpu_supports() features
---
@@ -16560,32 +16560,72 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned
BuiltinID,
#include "llvm/TargetParser/PPCTargetParser.def"
auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx,
- unsigned CompOp,
+
@@ -364,7 +364,14 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public
TargetInfo {
// have Glibc since it is Glibc that provides the HWCAP[2] in the auxv.
static constexpr int MINIMUM_AIX_OS_MAJOR = 7;
static constexpr int MINIMUM_AIX_OS_MINOR = 2;
- bool
@@ -364,7 +364,14 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public
TargetInfo {
// have Glibc since it is Glibc that provides the HWCAP[2] in the auxv.
static constexpr int MINIMUM_AIX_OS_MAJOR = 7;
static constexpr int MINIMUM_AIX_OS_MINOR = 2;
- bool
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH 1/7] Implement a subset of builtin_cpu_supports() features
---
@@ -16560,32 +16560,72 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned
BuiltinID,
#include "llvm/TargetParser/PPCTargetParser.def"
auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx,
- unsigned CompOp,
+
@@ -364,7 +364,14 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public
TargetInfo {
// have Glibc since it is Glibc that provides the HWCAP[2] in the auxv.
static constexpr int MINIMUM_AIX_OS_MAJOR = 7;
static constexpr int MINIMUM_AIX_OS_MINOR = 2;
- bool
https://github.com/amy-kwan commented:
Group review comments.
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -132,6 +132,14 @@ PPC_LNX_CPU("power10",47)
#ifndef AIX_POWERPC_USE_SYS_CONF
#define AIX_POWERPC_USE_SYS_CONF
#define AIX_SYSCON_IMPL_IDX 1
+ #define AIX_SYSCON_CACHE_IDX 5
+ #define AIX_SYSCON_SMT_IDX 44
+ #define AIX_SYSCON_VMX_IDX 46
+ #define AIX_SYSCON_DFP_IDX
https://github.com/amy-kwan edited
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH 1/6] Implement a subset of builtin_cpu_supports() features
---
@@ -16560,32 +16560,69 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned
BuiltinID,
#include "llvm/TargetParser/PPCTargetParser.def"
auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx,
- unsigned CompOp,
+
@@ -16560,32 +16560,69 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned
BuiltinID,
#include "llvm/TargetParser/PPCTargetParser.def"
auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx,
- unsigned CompOp,
+
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH 1/5] Implement a subset of builtin_cpu_supports() features
---
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -141,23 +149,30 @@ PPC_LNX_CPU("power10",47)
#define AIX_BUILTIN_PPC_TRUE 1
#define AIX_BUILTIN_PPC_FALSE 0
#define USE_SYS_CONF 2
+ #define SYS_CALL 3
// Supported COMPARE_OP values.
#define COMP_EQ 0
+ #define COMP_GT 1
+ #define COMP_GE 2
+ #define
@@ -16560,32 +16560,69 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned
BuiltinID,
#include "llvm/TargetParser/PPCTargetParser.def"
auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx,
- unsigned CompOp,
+
@@ -16560,32 +16560,69 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned
BuiltinID,
#include "llvm/TargetParser/PPCTargetParser.def"
auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx,
- unsigned CompOp,
+
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH 1/4] Implement a subset of builtin_cpu_supports() features
---
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin edited
https://github.com/llvm/llvm-project/pull/82809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH 1/3] Implement a subset of builtin_cpu_supports() features
---
https://github.com/diggerlin updated
https://github.com/llvm/llvm-project/pull/82809
>From cef79b36bcb3f4b7452d01aafdf111ff0e50605d Mon Sep 17 00:00:00 2001
From: zhijian
Date: Fri, 23 Feb 2024 13:23:18 -0500
Subject: [PATCH 1/2] Implement a subset of builtin_cpu_supports() features
---
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
@llvm/pr-subscribers-backend-powerpc
Author: zhijian lin (diggerlin)
Changes
The features which __builtin_cpu_support() supports are descripted in
https://github.com/diggerlin created
https://github.com/llvm/llvm-project/pull/82809
The features which __builtin_cpu_support() supports are descripted in
50 matches
Mail list logo