xref: /aosp_15_r20/external/llvm/lib/Target/Mips/MCTargetDesc/MipsMCNaCl.h (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker //===-- MipsMCNaCl.h - NaCl-related declarations --------------------------===//
2*9880d681SAndroid Build Coastguard Worker //
3*9880d681SAndroid Build Coastguard Worker //                     The LLVM Compiler Infrastructure
4*9880d681SAndroid Build Coastguard Worker //
5*9880d681SAndroid Build Coastguard Worker // This file is distributed under the University of Illinois Open Source
6*9880d681SAndroid Build Coastguard Worker // License. See LICENSE.TXT for details.
7*9880d681SAndroid Build Coastguard Worker //
8*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
9*9880d681SAndroid Build Coastguard Worker 
10*9880d681SAndroid Build Coastguard Worker #ifndef LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSMCNACL_H
11*9880d681SAndroid Build Coastguard Worker #define LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSMCNACL_H
12*9880d681SAndroid Build Coastguard Worker 
13*9880d681SAndroid Build Coastguard Worker #include "llvm/MC/MCELFStreamer.h"
14*9880d681SAndroid Build Coastguard Worker 
15*9880d681SAndroid Build Coastguard Worker namespace llvm {
16*9880d681SAndroid Build Coastguard Worker 
17*9880d681SAndroid Build Coastguard Worker // Log2 of the NaCl MIPS sandbox's instruction bundle size.
18*9880d681SAndroid Build Coastguard Worker static const unsigned MIPS_NACL_BUNDLE_ALIGN = 4u;
19*9880d681SAndroid Build Coastguard Worker 
20*9880d681SAndroid Build Coastguard Worker bool isBasePlusOffsetMemoryAccess(unsigned Opcode, unsigned *AddrIdx,
21*9880d681SAndroid Build Coastguard Worker                                   bool *IsStore = nullptr);
22*9880d681SAndroid Build Coastguard Worker bool baseRegNeedsLoadStoreMask(unsigned Reg);
23*9880d681SAndroid Build Coastguard Worker 
24*9880d681SAndroid Build Coastguard Worker // This function creates an MCELFStreamer for Mips NaCl.
25*9880d681SAndroid Build Coastguard Worker MCELFStreamer *createMipsNaClELFStreamer(MCContext &Context, MCAsmBackend &TAB,
26*9880d681SAndroid Build Coastguard Worker                                          raw_pwrite_stream &OS,
27*9880d681SAndroid Build Coastguard Worker                                          MCCodeEmitter *Emitter, bool RelaxAll);
28*9880d681SAndroid Build Coastguard Worker }
29*9880d681SAndroid Build Coastguard Worker 
30*9880d681SAndroid Build Coastguard Worker #endif
31