• fanzha02's avatar
    cmd/internal/obj/arm64: fix assemble msr/mrs bug · 556fb16b
    fanzha02 authored
    The arguments <pstatefield> is a struct that includes two elements,
    element reg is special register, elememt enc is pstate field values.
    The current code compares two different type values and get a incorrect
    result.
    
    The fix follows pstate field to create a systemreg struct,
    each system register has a vaule to use in instruction.
    
    Uncomment the msr/mrs cases.
    
    Fixes #21464
    
    Change-Id: I1bb1587ec8548f3e4bd8d5be4d7127bd10d53186
    Reviewed-on: https://go-review.googlesource.com/56030Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    556fb16b
asm7.go 117 KB