Page MenuHomeFreeBSD

D14018.id38324.diff
No OneTemporary

D14018.id38324.diff

Index: sys/mips/mips/machdep.c
===================================================================
--- sys/mips/mips/machdep.c
+++ sys/mips/mips/machdep.c
@@ -383,7 +383,14 @@
void
mips_postboot_fixup(void)
{
- static char fake_preload[256];
+ /*
+ * The compiler/linker can align fake_preload anyway it would like.
+ * When building the kernel with gcc+bfd this always happened to
+ * be a multiple of 8. However, when building with clang we have to
+ * explicitly mark it as aligned to 8 bytes since the compiler will
+ * emit sd instructions to store to this buffer.
+ */
+ static char fake_preload[256] __aligned(8);
caddr_t preload_ptr = (caddr_t)&fake_preload[0];
size_t size = 0;

File Metadata

Mime Type
text/plain
Expires
Thu, Feb 6, 7:59 AM (18 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16489507
Default Alt Text
D14018.id38324.diff (702 B)

Event Timeline