Files
swift-mirror/stdlib/public/RuntimeModule/modules/FixedLayout.h
Alastair Houghton 760cc57bef [Backtracing] Rename _Backtracing to Runtime.
Move the backtracing code into a new Runtime module.  This means renaming
the Swift Runtime's CMake target because otherwise there will be a name
clash.

rdar://124913332
2025-01-17 10:09:36 +00:00

63 lines
1.4 KiB
C++

//===--- FixedLayout.h - Types whose layout must be fixed -------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// Defines types whose in-memory layout must be fixed, which therefore have
// to be defined using C code.
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_BACKTRACING_FIXED_LAYOUT_H
#define SWIFT_BACKTRACING_FIXED_LAYOUT_H
#include <stdint.h>
#ifdef __cplusplus
namespace swift {
namespace runtime {
namespace backtrace {
#endif
struct x86_64_gprs {
uint64_t _r[16];
uint64_t rflags;
uint16_t cs, fs, gs, _pad0;
uint64_t rip;
uint64_t valid;
};
struct i386_gprs {
uint32_t _r[8];
uint32_t eflags;
uint16_t segreg[6];
uint32_t eip;
uint32_t valid;
};
struct arm64_gprs {
uint64_t _x[32];
uint64_t pc;
uint64_t valid;
};
struct arm_gprs {
uint32_t _r[16];
uint32_t valid;
};
#ifdef __cplusplus
} // namespace backtrace
} // namespace runtime
} // namespace swift
#endif
#endif // SWIFT_BACKTRACING_FIXED_LAYOUT_H