llvm.org GIT mirror llvm / 72ba1af
Stop uppercasing build attribute data. The string data for string-valued build attributes were being unconditionally uppercased. There is no mention in the ARM ABI addenda about case conventions, so it's technically implementation defined as to whether the data are capitialised in some way or not. However, there are good reasons not to captialise the data. * It's less work. * Some vendors may legitimately have case-sensitive checks for these attributes which would fail on LLVM generated object files. * There could be locale issues with uppercasing. The original reasons for uppercasing appear to have stemmed from an old codesourcery toolchain behaviour, see http://comments.gmane.org/gmane.comp.compilers.llvm.cvs/87133 This patch makes the object file emitted no longer captialise string data, it encodes as seen in the assembly source. Change-Id: Ibe20dd6e60d2773d57ff72a78470839033aa5538 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222882 91177308-0d34-0410-b5e6-96231b3b80d8 Charlie Turner 5 years ago
8 changed file(s) with 16 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
978978 Streamer.EmitULEB128IntValue(item.IntValue);
979979 break;
980980 case AttributeItem::TextAttribute:
981 Streamer.EmitBytes(item.StringValue.upper());
981 Streamer.EmitBytes(item.StringValue);
982982 Streamer.EmitIntValue(0, 1); // '\0'
983983 break;
984984 case AttributeItem::NumericAndTextAttributes:
985985 Streamer.EmitULEB128IntValue(item.IntValue);
986 Streamer.EmitBytes(item.StringValue.upper());
986 Streamer.EmitBytes(item.StringValue);
987987 Streamer.EmitIntValue(0, 1); // '\0'
988988 break;
989989 }
7777 // CHECK-NEXT: EntrySize: 0
7878 // CHECK-NEXT: SectionData (
7979 // CHECK-NEXT: 0000: 41460000 00616561 62690001 3C000000
80 // CHECK-NEXT: 0010: 05434F52 5445582D 41380006 0A074108
80 // CHECK-NEXT: 0010: 05636F72 7465782D 61380006 0A074108
8181 // CHECK-NEXT: 0020: 0109020A 030C0214 01150117 01180119
8282 // CHECK-NEXT: 0030: 011B001C 0124012A 012C0244 036EA001
8383 // CHECK-NEXT: 0040: 81013100 FA0101
1515 @ CHECK-ATTR: FileAttributes {
1616 @ CHECK-ATTR: Attribute {
1717 @ CHECK-ATTR: TagName: CPU_name
18 @ CHECK-ATTR: Value: IWMMXT
18 @ CHECK-ATTR: Value: iwmmxt
1919 @ CHECK-ATTR: }
2020 @ CHECK-ATTR: Attribute {
2121 @ CHECK-ATTR: TagName: CPU_arch
1515 @ CHECK-ATTR: FileAttributes {
1616 @ CHECK-ATTR: Attribute {
1717 @ CHECK-ATTR: TagName: CPU_name
18 @ CHECK-ATTR: Value: IWMMXT2
18 @ CHECK-ATTR: Value: iwmmxt2
1919 @ CHECK-ATTR: }
2020 @ CHECK-ATTR: Attribute {
2121 @ CHECK-ATTR: TagName: CPU_arch
1919 @ CHECK: 10000000
2020
2121 .cpu cortex-a8
22 @ CHECK: 05
23 @ CHECK: 434F52 5445582D 413800
22 @ CHECK: 05636F72 7465782D 613800
2423
2524 @ CHECK: )
22
33 .syntax unified
44 .thumb
5
5 @ FIXME: The next directive is not correct, Tag_compatibility isn't getting parsed correctly.
66 .eabi_attribute Tag_compatibility, 1
77 .eabi_attribute Tag_compatibility, 1, "aeabi"
88
99 @ CHECK-ATTR: FileAttributes {
1010 @ CHECK-ATTR: Attribute {
11 @ CHECK-ATTR: Value: 1, AEABI
11 @ CHECK-ATTR: Value: 1, aeabi
1212 @ CHECK-ATTR: TagName: compatibility
1313 @ CHECK-ATTR: Description: AEABI Conformant
1414 @ CHECK-ATTR: }
88 @ CHECK: .eabi_attribute 4, "Cortex-A9"
99 @ CHECK-OBJ: Tag: 4
1010 @ CHECK-OBJ-NEXT: TagName: CPU_raw_name
11 @ CHECK-OBJ-NEXT: Value: CORTEX-A9
11 @ CHECK-OBJ-NEXT: Value: Cortex-A9
1212 .eabi_attribute Tag_CPU_name, "cortex-a9"
1313 @ CHECK: .cpu cortex-a9
1414 @ CHECK-OBJ: Tag: 5
1515 @ CHECK-OBJ-NEXT: TagName: CPU_name
16 @ CHECK-OBJ-NEXT: Value: CORTEX-A9
16 @ CHECK-OBJ-NEXT: Value: cortex-a9
1717 .eabi_attribute Tag_CPU_arch, 10
1818 @ CHECK: .eabi_attribute 6, 10
1919 @ CHECK-OBJ: Tag: 6
169169 .eabi_attribute Tag_compatibility, 1, "aeabi"
170170 @ CHECK: .eabi_attribute 32, 1, "aeabi"
171171 @ CHECK-OBJ: Tag: 32
172 @ CHECK-OBJ-NEXT: Value: 1, AEABI
172 @ CHECK-OBJ-NEXT: Value: 1, aeabi
173173 @ CHECK-OBJ-NEXT: TagName: compatibility
174174 @ CHECK-OBJ-NEXT: Description: AEABI Conformant
175175 .eabi_attribute Tag_CPU_unaligned_access, 0
212212 @ CHECK: .eabi_attribute 65, "gnu"
213213 @ CHECK-OBJ: Tag: 65
214214 @ CHECK-OBJ-NEXT: TagName: also_compatible_with
215 @ CHECK-OBJ-NEXT: Value: GNU
215 @ CHECK-OBJ-NEXT: Value: gnu
216216 .eabi_attribute Tag_T2EE_use, 0
217217 @ CHECK: .eabi_attribute 66, 0
218218 @ CHECK-OBJ: Tag: 66
5353 @ CHECK: Attribute {
5454 @ CHECK: Tag: 4
5555 @ CHECK: TagName: CPU_raw_name
56 @ CHECK: Value: CORTEX-A9
56 @ CHECK: Value: Cortex-A9
5757 @ CHECK: }
5858 @ CHECK: Attribute {
5959 @ CHECK: Tag: 5
6060 @ CHECK: TagName: CPU_name
61 @ CHECK: Value: CORTEX-A9
61 @ CHECK: Value: cortex-a9
6262 @ CHECK: }
6363 @ CHECK: Attribute {
6464 @ CHECK: Tag: 6
218218 @ CHECK: }
219219 @ CHECK: Attribute {
220220 @ CHECK: Tag: 32
221 @ CHECK: Value: 1, AEABI
221 @ CHECK: Value: 1, aeabi
222222 @ CHECK: TagName: compatibility
223223 @ CHECK: Description: AEABI Conformant
224224 @ CHECK: }
261261 @ CHECK: Attribute {
262262 @ CHECK: Tag: 65
263263 @ CHECK: TagName: also_compatible_with
264 @ CHECK: Value: GNU
264 @ CHECK: Value: gnu
265265 @ CHECK: }
266266 @ CHECK: Attribute {
267267 @ CHECK: Tag: 66