[all-commits] [llvm/llvm-project] 7c44ee: [ms] [llvm-ml] Fix struct padding logic

Eric Astor via All-commits all-commits at lists.llvm.org
Mon Sep 14 11:12:51 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c44ee8e1937c7402a106f3fa6a356caa73a14e8
      https://github.com/llvm/llvm-project/commit/7c44ee8e1937c7402a106f3fa6a356caa73a14e8
  Author: Eric Astor <epastor at google.com>
  Date:   2020-09-14 (Mon, 14 Sep 2020)

  Changed paths:
    M llvm/lib/MC/MCParser/MasmParser.cpp
    A llvm/test/tools/llvm-ml/struct_alignment.test

  Log Message:
  -----------
  [ms] [llvm-ml] Fix struct padding logic

MASM structs are end-padded to have size a multiple of the smaller of the requested alignment and the size of their largest field (taken recursively, if they have a field of STRUCT type).

This matches the behavior of ml.exe and ml64.exe. Our original implementation followed the MASM 6.0 documentation, which instead specified that MASM structs were padded to a multiple of their requested alignment.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D87248




More information about the All-commits mailing list