Skip to content

Commit bc8c554

Browse files
authored
Merge pull request #420 from tsatke/patch-1
adapt data layout to match LLVM's
2 parents 2e9fe88 + 2ebe789 commit bc8c554

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

bios/stage-4/src/main.rs

+4
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ fn detect_rsdp() -> Option<PhysAddr> {
262262
#[derive(Clone)]
263263
struct IdentityMapped;
264264
impl AcpiHandler for IdentityMapped {
265+
// TODO FIXME: This inline(never) annotation is required. Without it,
266+
// LLVM replaces the `search_for_on_bios` call below with a `ud2`
267+
// instruction. See https://github.com/rust-osdev/bootloader/issues/425
268+
#[inline(never)]
265269
unsafe fn map_physical_region<T>(
266270
&self,
267271
physical_address: usize,

i386-code16-boot-sector.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"arch": "x86",
33
"cpu": "i386",
4-
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128",
4+
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
55
"dynamic-linking": false,
66
"executables": true,
77
"linker-flavor": "ld.lld",

i386-code16-stage-2.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"arch": "x86",
33
"cpu": "i386",
4-
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128",
4+
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
55
"dynamic-linking": false,
66
"executables": true,
77
"linker-flavor": "ld.lld",

i686-stage-3.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"arch": "x86",
33
"cpu": "i386",
4-
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128",
4+
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
55
"dynamic-linking": false,
66
"executables": true,
77
"linker-flavor": "ld.lld",

x86_64-stage-4.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"arch": "x86_64",
33
"code-model": "kernel",
44
"cpu": "x86-64",
5-
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128",
5+
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
66
"disable-redzone": true,
77
"features": "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float",
88
"linker": "rust-lld",

0 commit comments

Comments
 (0)