diff options
| author | Momchil Velikov <momchil.velikov@arm.com> | 2019-07-17 13:23:27 +0000 |
|---|---|---|
| committer | Momchil Velikov <momchil.velikov@arm.com> | 2019-07-17 13:23:27 +0000 |
| commit | 4b8da3a503e434ddbc08ecf66582475765f449bc (patch) | |
| tree | 1a35c3ec28ad30ad65c7916467a703b8f249e33f /clang/test/Sema | |
| parent | 2889fe67691b4220e31bbf8c78b63474c973f26c (diff) | |
| download | bcm5719-llvm-4b8da3a503e434ddbc08ecf66582475765f449bc.tar.gz bcm5719-llvm-4b8da3a503e434ddbc08ecf66582475765f449bc.zip | |
[AArch64] Add support for Transactional Memory Extension (TME)
TME is a future architecture technology, documented in
https://developer.arm.com/architectures/cpu-architecture/a-profile/exploration-tools
https://developer.arm.com/docs/ddi0601/a
More about the future architectures:
https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/new-technologies-for-the-arm-a-profile-architecture
This patch adds support for the TME instructions TSTART, TTEST, TCOMMIT, and
TCANCEL and the target feature/arch extension "tme".
It also implements TME builtin functions, defined in ACLE Q2 2019
(https://developer.arm.com/docs/101028/latest)
Patch by Javed Absar and Momchil Velikov
Differential Revision: https://reviews.llvm.org/D64416
llvm-svn: 366322
Diffstat (limited to 'clang/test/Sema')
| -rw-r--r-- | clang/test/Sema/aarch64-tme-errors.c | 8 | ||||
| -rw-r--r-- | clang/test/Sema/aarch64-tme-tcancel-const-error.c | 4 | ||||
| -rw-r--r-- | clang/test/Sema/aarch64-tme-tcancel-range-error.c | 4 |
3 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Sema/aarch64-tme-errors.c b/clang/test/Sema/aarch64-tme-errors.c new file mode 100644 index 00000000000..0e9c2a6beec --- /dev/null +++ b/clang/test/Sema/aarch64-tme-errors.c @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -triple aarch64-eabi -verify %s + +#include "arm_acle.h" + +void test_no_tme_funcs() { + __tstart(); // expected-warning{{implicit declaration of function '__tstart'}} + __builtin_tstart(); // expected-error{{use of unknown builtin '__builtin_tstart'}} +} diff --git a/clang/test/Sema/aarch64-tme-tcancel-const-error.c b/clang/test/Sema/aarch64-tme-tcancel-const-error.c new file mode 100644 index 00000000000..f97ece59b66 --- /dev/null +++ b/clang/test/Sema/aarch64-tme-tcancel-const-error.c @@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -triple aarch64-eabi -target-feature +tme -verify %s +void t_cancel(unsigned short u) { + __builtin_arm_tcancel(u); // expected-error{{argument to '__builtin_arm_tcancel' must be a constant integer}} +} diff --git a/clang/test/Sema/aarch64-tme-tcancel-range-error.c b/clang/test/Sema/aarch64-tme-tcancel-range-error.c new file mode 100644 index 00000000000..c61ec90dfa5 --- /dev/null +++ b/clang/test/Sema/aarch64-tme-tcancel-range-error.c @@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -triple aarch64-eabi -target-feature +tme -verify %s +void t_cancel() { + __builtin_arm_tcancel(0x12345u); // expected-error{{argument value 74565 is outside the valid range [0, 65535]}} +} |

