[COFF, ARM64] Add __getReg intrinsic
Reviewers: rnk, mstorsjo, compnerd, TomTan, haripul, javed.absar, efriedma
Reviewed By: efriedma
Subscribers: peter.smith, efriedma, kristof.beyls, chrib, cfe-commits
Differential Revision: https://reviews.llvm.org/D52838
llvm-svn: 343824
2018-10-05 06:32:42 +08:00
|
|
|
// RUN: %clang_cc1 -triple arm64-windows -fsyntax-only -verify \
|
|
|
|
// RUN: -fms-compatibility -ffreestanding -fms-compatibility-version=17.00 %s
|
|
|
|
|
|
|
|
#include <intrin.h>
|
|
|
|
|
|
|
|
void check__getReg() {
|
|
|
|
__getReg(-1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
|
|
__getReg(32); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
|
|
}
|
[COFF, ARM64] Add _ReadStatusReg and_WriteStatusReg intrinsics
Reviewers: rnk, compnerd, mstorsjo, efriedma, TomTan, haripul, javed.absar
Reviewed By: efriedma
Subscribers: dmajor, kristof.beyls, chrib, cfe-commits
Differential Revision: https://reviews.llvm.org/D53115
llvm-svn: 344765
2018-10-19 07:35:35 +08:00
|
|
|
|
|
|
|
void check_ReadWriteStatusReg(int v) {
|
|
|
|
int x;
|
|
|
|
_ReadStatusReg(x); // expected-error {{argument to '_ReadStatusReg' must be a constant integer}}
|
|
|
|
_WriteStatusReg(x, v); // expected-error {{argument to '_WriteStatusReg' must be a constant integer}}
|
|
|
|
}
|