2014-02-01 15:19:38 +08:00
|
|
|
# RUN: llvm-mc -triple i386-unknown-unknown %s 2> %t.err | FileCheck %s
|
|
|
|
# RUN: FileCheck --check-prefix=CHECK-WARNINGS %s < %t.err
|
2016-05-28 13:57:48 +08:00
|
|
|
# RUN: llvm-mc -triple i386-unknown-unknown -filetype=obj -o %t.o %s 2> %t.err
|
|
|
|
# RUN: FileCheck --check-prefix=OBJ-WARNINGS %s < %t.err
|
2009-06-25 07:30:00 +08:00
|
|
|
|
2009-07-09 04:50:34 +08:00
|
|
|
# CHECK: TEST0:
|
2016-05-28 13:57:48 +08:00
|
|
|
# CHECK: .fill 1, 1, 0xa
|
2009-06-25 07:30:00 +08:00
|
|
|
TEST0:
|
|
|
|
.fill 1, 1, 10
|
|
|
|
|
2009-07-09 04:50:34 +08:00
|
|
|
# CHECK: TEST1:
|
2016-05-28 13:57:48 +08:00
|
|
|
# CHECK: .fill 2, 2, 0x3
|
2009-06-25 07:30:00 +08:00
|
|
|
TEST1:
|
|
|
|
.fill 2, 2, 3
|
2009-08-21 23:43:35 +08:00
|
|
|
|
|
|
|
# CHECK: TEST2:
|
2016-05-28 13:57:48 +08:00
|
|
|
# CHECK: .fill 1, 8, 0x4
|
2009-08-21 23:43:35 +08:00
|
|
|
TEST2:
|
|
|
|
.fill 1, 8, 4
|
2013-09-25 01:44:41 +08:00
|
|
|
|
|
|
|
# CHECK: TEST3
|
2016-05-28 13:57:48 +08:00
|
|
|
# CHECK: .fill 4
|
2013-09-25 01:44:41 +08:00
|
|
|
TEST3:
|
|
|
|
.fill 4
|
|
|
|
|
|
|
|
# CHECK: TEST4
|
2016-05-28 13:57:48 +08:00
|
|
|
# CHECK: .fill 4, 2
|
2013-09-25 01:44:41 +08:00
|
|
|
TEST4:
|
|
|
|
.fill 4, 2
|
2014-02-01 15:19:38 +08:00
|
|
|
|
|
|
|
# CHECK: TEST5
|
2016-05-28 13:57:48 +08:00
|
|
|
# CHECK: .fill 4, 3, 0x2
|
2014-02-01 15:19:38 +08:00
|
|
|
TEST5:
|
|
|
|
.fill 4, 3, 2
|
|
|
|
|
|
|
|
# CHECK: TEST6
|
2016-05-28 13:57:48 +08:00
|
|
|
# CHECK: .fill 1, 8, 0x2
|
2014-02-01 15:19:38 +08:00
|
|
|
# CHECK-WARNINGS: '.fill' directive with size greater than 8 has been truncated to 8
|
|
|
|
TEST6:
|
|
|
|
.fill 1, 9, 2
|
|
|
|
|
|
|
|
# CHECK: TEST7
|
2016-05-28 13:57:48 +08:00
|
|
|
# CHECK: .fill 1, 8, 0x0
|
2014-02-01 15:19:38 +08:00
|
|
|
# CHECK-WARNINGS: '.fill' directive pattern has been truncated to 32-bits
|
|
|
|
TEST7:
|
|
|
|
.fill 1, 8, 1<<32
|
|
|
|
|
2016-05-28 13:57:48 +08:00
|
|
|
# CHECK: TEST8
|
|
|
|
# CHECK: .fill -1, 8, 0x1
|
|
|
|
# OBJ-WARNINGS: '.fill' directive with negative repeat count has no effect
|
2014-02-01 15:19:38 +08:00
|
|
|
TEST8:
|
|
|
|
.fill -1, 8, 1
|
|
|
|
|
|
|
|
# CHECK-WARNINGS: '.fill' directive with negative size has no effect
|
|
|
|
TEST9:
|
|
|
|
.fill 1, -1, 1
|
|
|
|
|
|
|
|
# CHECK: TEST10
|
2016-05-28 13:57:48 +08:00
|
|
|
# CHECK: .fill 1, 3, 0x12345678
|
2014-02-01 15:19:38 +08:00
|
|
|
TEST10:
|
|
|
|
.fill 1, 3, 0x12345678
|
2016-05-28 13:57:48 +08:00
|
|
|
|
|
|
|
# CHECK: TEST11
|
|
|
|
# CHECK: .fill TEST11-TEST10, 1, 0x0
|
|
|
|
TEST11:
|
|
|
|
.fill TEST11 - TEST10
|
|
|
|
|
|
|
|
# CHECK: TEST12
|
|
|
|
# CHECK: .fill TEST11-TEST12, 3, 0x12345678
|
|
|
|
# OBJ-WARNINGS: '.fill' directive with negative repeat count has no effect
|
|
|
|
TEST12:
|
|
|
|
.fill TEST11 - TEST12, 3, 0x12345678
|