xref: /freebsd/contrib/llvm-project/llvm/lib/Target/X86/TargetInfo/X86TargetInfo.cpp (revision 349cc55c9796c4596a5b9904cd3281af295f878f)
10b57cec5SDimitry Andric //===-- X86TargetInfo.cpp - X86 Target Implementation ---------------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric 
90b57cec5SDimitry Andric #include "TargetInfo/X86TargetInfo.h"
10*349cc55cSDimitry Andric #include "llvm/MC/TargetRegistry.h"
110b57cec5SDimitry Andric using namespace llvm;
120b57cec5SDimitry Andric 
getTheX86_32Target()130b57cec5SDimitry Andric Target &llvm::getTheX86_32Target() {
140b57cec5SDimitry Andric   static Target TheX86_32Target;
150b57cec5SDimitry Andric   return TheX86_32Target;
160b57cec5SDimitry Andric }
getTheX86_64Target()170b57cec5SDimitry Andric Target &llvm::getTheX86_64Target() {
180b57cec5SDimitry Andric   static Target TheX86_64Target;
190b57cec5SDimitry Andric   return TheX86_64Target;
200b57cec5SDimitry Andric }
210b57cec5SDimitry Andric 
LLVMInitializeX86TargetInfo()22480093f4SDimitry Andric extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86TargetInfo() {
230b57cec5SDimitry Andric   RegisterTarget<Triple::x86, /*HasJIT=*/true> X(
240b57cec5SDimitry Andric       getTheX86_32Target(), "x86", "32-bit X86: Pentium-Pro and above", "X86");
250b57cec5SDimitry Andric 
260b57cec5SDimitry Andric   RegisterTarget<Triple::x86_64, /*HasJIT=*/true> Y(
270b57cec5SDimitry Andric       getTheX86_64Target(), "x86-64", "64-bit X86: EM64T and AMD64", "X86");
280b57cec5SDimitry Andric }
29