Deleted Added
full compact
ARMWinEH.h (276479) ARMWinEH.h (280031)
1//===-- llvm/Support/WinARMEH.h - Windows on ARM EH Constants ---*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
1//===-- llvm/Support/WinARMEH.h - Windows on ARM EH Constants ---*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef LLVM_SUPPORT_WINARMEH_H
11#define LLVM_SUPPORT_WINARMEH_H
10#ifndef LLVM_SUPPORT_ARMWINEH_H
11#define LLVM_SUPPORT_ARMWINEH_H
12
13#include "llvm/ADT/ArrayRef.h"
14#include "llvm/Support/Endian.h"
15
16namespace llvm {
17namespace ARM {
18namespace WinEH {
19enum class RuntimeFunctionFlag {

--- 325 unchanged lines hidden (view full) ---

345 if (HeaderWords(*this) == 1)
346 return (Data[0] & 0xf0000000) >> 28;
347 return (Data[1] & 0x00ff0000) >> 16;
348 }
349
350 ArrayRef<support::ulittle32_t> EpilogueScopes() const {
351 assert(E() == 0 && "epilogue scopes are only present when the E bit is 0");
352 size_t Offset = HeaderWords(*this);
12
13#include "llvm/ADT/ArrayRef.h"
14#include "llvm/Support/Endian.h"
15
16namespace llvm {
17namespace ARM {
18namespace WinEH {
19enum class RuntimeFunctionFlag {

--- 325 unchanged lines hidden (view full) ---

345 if (HeaderWords(*this) == 1)
346 return (Data[0] & 0xf0000000) >> 28;
347 return (Data[1] & 0x00ff0000) >> 16;
348 }
349
350 ArrayRef<support::ulittle32_t> EpilogueScopes() const {
351 assert(E() == 0 && "epilogue scopes are only present when the E bit is 0");
352 size_t Offset = HeaderWords(*this);
353 return ArrayRef<support::ulittle32_t>(&Data[Offset], EpilogueCount());
353 return makeArrayRef(&Data[Offset], EpilogueCount());
354 }
355
354 }
355
356 ArrayRef<support::ulittle8_t> UnwindByteCode() const {
356 ArrayRef<uint8_t> UnwindByteCode() const {
357 const size_t Offset = HeaderWords(*this)
358 + (E() ? 0 : EpilogueCount());
357 const size_t Offset = HeaderWords(*this)
358 + (E() ? 0 : EpilogueCount());
359 const support::ulittle8_t *ByteCode =
360 reinterpret_cast<const support::ulittle8_t *>(&Data[Offset]);
361 return ArrayRef<support::ulittle8_t>(ByteCode,
362 CodeWords() * sizeof(uint32_t));
359 const uint8_t *ByteCode =
360 reinterpret_cast<const uint8_t *>(&Data[Offset]);
361 return makeArrayRef(ByteCode, CodeWords() * sizeof(uint32_t));
363 }
364
365 uint32_t ExceptionHandlerRVA() const {
366 assert(X() && "Exception Handler RVA is only valid if the X bit is set");
367 return Data[HeaderWords(*this) + EpilogueCount() + CodeWords()];
368 }
369
370 uint32_t ExceptionHandlerParameter() const {

--- 5 unchanged lines hidden (view full) ---

376inline size_t HeaderWords(const ExceptionDataRecord &XR) {
377 return (XR.Data[0] & 0xff800000) ? 1 : 2;
378}
379}
380}
381}
382
383#endif
362 }
363
364 uint32_t ExceptionHandlerRVA() const {
365 assert(X() && "Exception Handler RVA is only valid if the X bit is set");
366 return Data[HeaderWords(*this) + EpilogueCount() + CodeWords()];
367 }
368
369 uint32_t ExceptionHandlerParameter() const {

--- 5 unchanged lines hidden (view full) ---

375inline size_t HeaderWords(const ExceptionDataRecord &XR) {
376 return (XR.Data[0] & 0xff800000) ? 1 : 2;
377}
378}
379}
380}
381
382#endif
384