[PATCH] D75527: [yaml2obj] - Add `ELFYAML::YAMLIntUInt` to fix how we parse a relocation `Addend` key.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 17 04:27:47 PDT 2020
grimar marked an inline comment as done.
grimar added inline comments.
================
Comment at: llvm/test/tools/yaml2obj/ELF/relocation-addend.yaml:7-8
-# RUN: yaml2obj %s -o %t1 -D ADDEND=9223372036854775807
-# RUN: llvm-readobj -r %t1 | FileCheck %s --check-prefix=MAX64
-# RUN: yaml2obj %s -o %t2 -D ADDEND=0x7FFFFFFFFFFFFFFF
-# RUN: llvm-readobj -r %t2 | FileCheck %s --check-prefix=MAX64
+## INT64_MIN == (-9223372036854775807i64 - 1)
+## UINT64_MAX == 0xffffffffffffffffui64
----------------
jhenderson wrote:
> I don't think you need the i64/ui64 bits of the values.
>
> Also, why not just `-9223372036854775808`?
> Also, why not just -9223372036854775808?
I've just took it from my `stdint.h`:
```
// These macros must exactly match those in the Windows SDK's intsafe.h.
#define INT8_MIN (-127i8 - 1)
#define INT16_MIN (-32767i16 - 1)
#define INT32_MIN (-2147483647i32 - 1)
#define INT64_MIN (-9223372036854775807i64 - 1)
#define INT8_MAX 127i8
#define INT16_MAX 32767i16
#define INT32_MAX 2147483647i32
#define INT64_MAX 9223372036854775807i64
#define UINT8_MAX 0xffui8
#define UINT16_MAX 0xffffui16
#define UINT32_MAX 0xffffffffui32
#define UINT64_MAX 0xffffffffffffffffui64
```
I do not mind to change it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75527/new/
https://reviews.llvm.org/D75527
More information about the llvm-commits
mailing list