mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
1bc07f6217
This patch implements the final bits of CMSE code generation: * emit special linker symbols * restrict parameter passing to no use memory * emit BXNS and BLXNS instructions for returns from non-secure entry functions, and non-secure function calls, respectively * emit code to save/restore secure floating-point state around calls to non-secure functions * emit code to save/restore non-secure floating-pointy state upon entry to non-secure entry function, and return to non-secure state * emit code to clobber registers not used for arguments and returns * when switching to no-secure state Patch by Momchil Velikov, Bradley Smith, Javed Absar, David Green, possibly others. Differential Revision: https://reviews.llvm.org/D76518
21 lines
821 B
C++
21 lines
821 B
C++
//===-- ARMMachineFunctionInfo.cpp - ARM machine function info ------------===//
|
|
//
|
|
// 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "ARMMachineFunctionInfo.h"
|
|
#include "ARMSubtarget.h"
|
|
|
|
using namespace llvm;
|
|
|
|
void ARMFunctionInfo::anchor() {}
|
|
|
|
ARMFunctionInfo::ARMFunctionInfo(MachineFunction &MF)
|
|
: isThumb(MF.getSubtarget<ARMSubtarget>().isThumb()),
|
|
hasThumb2(MF.getSubtarget<ARMSubtarget>().hasThumb2()),
|
|
IsCmseNSEntry(MF.getFunction().hasFnAttribute("cmse_nonsecure_entry")),
|
|
IsCmseNSCall(MF.getFunction().hasFnAttribute("cmse_nonsecure_call")) {}
|