Skip to content

Aligment for i32, i64, f32, f64 is more than EABI states #24

@chbessonova

Description

@chbessonova

EABI p.2.1 states that char type has 8 bit alignment, and all other - 16 bit alignment.

Here is a clang generated IR for all basic types:

target datalayout = "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16"
target triple = "msp430"
@c = global i8 1, align 1
@s = global i16 266, align 2
@t = global i16 266, align 2
@l = global i32 163990, align 2
@ll = global i64 10737418300, align 8
@f = global float 1.000000e+00, align 4
@d = global double 1.000000e+00, align 8
@ld = global double 1.000000e+00, align 8
@p = global i8* @c, align 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions