Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions clang/include/clang/Basic/BuiltinsX86.td
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,7 @@
//
//===----------------------------------------------------------------------===//

include "clang/Basic/BuiltinsBase.td"

class X86Builtin<string prototype> : TargetBuiltin {
let Spellings = ["__builtin_ia32_" # NAME];
let Prototype = prototype;
let EnableOpenCLLong = 1;
}

class X86NoPrefixBuiltin<string prototype> : TargetBuiltin {
let Spellings = [NAME];
let Prototype = prototype;
}

class X86LibBuiltin<string prototype> : TargetLibBuiltin {
let Spellings = [NAME];
let Prototype = prototype;
}
include "clang/Basic/BuiltinsX86Base.td"

def rdpmc : X86Builtin<"unsigned long long int(int)">;
def rdtsc : X86Builtin<"unsigned long long int()">;
Expand Down
29 changes: 29 additions & 0 deletions clang/include/clang/Basic/BuiltinsX86Base.td
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//===--- BuiltinsX86Base.td - X86 Builtin function classes ------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file defines the X86-specific builtin function classes.
//
//===----------------------------------------------------------------------===//

include "clang/Basic/BuiltinsBase.td"

class X86Builtin<string prototype> : TargetBuiltin {
let Spellings = ["__builtin_ia32_" # NAME];
let Prototype = prototype;
let EnableOpenCLLong = 1;
}

class X86NoPrefixBuiltin<string prototype> : TargetBuiltin {
let Spellings = [NAME];
let Prototype = prototype;
}

class X86LibBuiltin<string prototype> : TargetLibBuiltin {
let Spellings = [NAME];
let Prototype = prototype;
}
253 changes: 0 additions & 253 deletions clang/include/clang/Basic/BuiltinsX86_64.def

This file was deleted.

485 changes: 485 additions & 0 deletions clang/include/clang/Basic/BuiltinsX86_64.td

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions clang/include/clang/Basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ clang_tablegen(BuiltinsX86.inc -gen-clang-builtins
SOURCE BuiltinsX86.td
TARGET ClangBuiltinsX86)

clang_tablegen(BuiltinsX86_64.inc -gen-clang-builtins
SOURCE BuiltinsX86_64.td
TARGET ClangBuiltinsX86_64)

# ARM NEON and MVE
clang_tablegen(arm_neon.inc -gen-arm-neon-sema
SOURCE arm_neon.td
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Basic/TargetBuiltins.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ namespace clang {
FirstX86_64Builtin,
LastX86CommonBuiltin = FirstX86_64Builtin - 1,
#define BUILTIN(ID, TYPE, ATTRS) BI##ID,
#include "clang/Basic/BuiltinsX86_64.def"
#include "clang/Basic/BuiltinsX86_64.inc"
LastTSBuiltin
};
}
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Basic/Targets/X86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static constexpr Builtin::Info BuiltinInfoX86[] = {
{#ID, TYPE, ATTRS, FEATURE, HeaderDesc::NO_HEADER, ALL_LANGUAGES},
#define TARGET_HEADER_BUILTIN(ID, TYPE, ATTRS, HEADER, LANGS, FEATURE) \
{#ID, TYPE, ATTRS, FEATURE, HeaderDesc::HEADER, LANGS},
#include "clang/Basic/BuiltinsX86_64.def"
#include "clang/Basic/BuiltinsX86_64.inc"
};

static const char *const GCCRegNames[] = {
Expand Down
Loading