mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-03 19:02:35 +00:00
[WebAssembly] MCFixupKindInfo's TargetSize is in bits rather than bytes.
llvm-svn: 257655
This commit is contained in:
parent
0eccad46d3
commit
0579006fe8
@ -73,8 +73,8 @@ void WebAssemblyAsmBackend::applyFixup(const MCFixup &Fixup, char *Data,
|
||||
unsigned DataSize, uint64_t Value,
|
||||
bool IsPCRel) const {
|
||||
const MCFixupKindInfo &Info = getFixupKindInfo(Fixup.getKind());
|
||||
unsigned NumBytes = RoundUpToAlignment(Info.TargetSize, 8);
|
||||
if (!Value)
|
||||
unsigned NumBytes = (Info.TargetSize + 7) / 8;
|
||||
if (Value == 0)
|
||||
return; // Doesn't change encoding.
|
||||
|
||||
// Shift the value into position.
|
||||
|
@ -175,3 +175,17 @@ define i8* @call_memcpy(i8* %p, i8* nocapture readonly %q, i32 %n) {
|
||||
; CHECK: .skip 512{{$}}
|
||||
; CHECK: .size rom, 512{{$}}
|
||||
@rom = constant [128 x i32] zeroinitializer, align 16
|
||||
|
||||
; CHECK: .type array,@object
|
||||
; CHECK-NEXT: array:
|
||||
; CHECK-NEXT: .skip 8
|
||||
; CHECK-NEXT: .size array, 8
|
||||
; CHECK: .type pointer_to_array,@object
|
||||
; CHECK-NEXT: .section .data.rel.ro,"aw",@progbits
|
||||
; CHECK-NEXT: .globl pointer_to_array
|
||||
; CHECK-NEXT: .align 2
|
||||
; CHECK-NEXT: pointer_to_array:
|
||||
; CHECK-NEXT: .int32 array+4
|
||||
; CHECK-NEXT: .size pointer_to_array, 4
|
||||
@array = internal constant [8 x i8] zeroinitializer, align 1
|
||||
@pointer_to_array = constant i8* getelementptr inbounds ([8 x i8], [8 x i8]* @array, i32 0, i32 4), align 4
|
||||
|
Loading…
x
Reference in New Issue
Block a user