Skip to content

Commit

Permalink
i#1959: Separate C++ literals and macros. Fix breakage from 24c4f7c.
Browse files Browse the repository at this point in the history
Error message on Debian i386 stretch DynamoRIO was:
.../suite/tests/client-interface/annotation-detection.cpp:69:5: error:
unable to find string literal operator 'operator""base' with 'const
char [228]', 'unsigned int' arguments

Xref #1958.

Review-URL: https://codereview.appspot.com/319990043
  • Loading branch information
egrimley-arm committed Jan 17, 2017
1 parent 5d5d154 commit ec2bbce
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/lib/dr_annotations_asm.h
Expand Up @@ -193,7 +193,7 @@ do { \
*/
# define ANNOTATION_FUNCTION_CLOBBER_LIST "%rax","%rcx","%rdx","%rsi","%rdi","%r8","%r9"
# define _CALL_TYPE
# define ANNOT_LBL(annot, base) #annot"_label@GOT"
# define ANNOT_LBL(annot, base) #annot "_label@GOT"
# else
/* (mov=5 + bsf/bsr=7) => 0xc */
# define LABEL_REFERENCE_LENGTH "0xc"
Expand All @@ -208,7 +208,7 @@ do { \
/* i#2050: i386 ABI forces us to use the base register as an offset into GOT, which is
* not the case for 64-bit.
*/
# define ANNOT_LBL(annot, base) #annot"_label@GOT(%"base")"
# define ANNOT_LBL(annot, base) #annot "_label@GOT(%" base ")"
# endif
# define DR_ANNOTATION_ATTRIBUTES \
__attribute__((noinline, visibility("hidden") _CALL_TYPE))
Expand All @@ -220,8 +220,8 @@ do { \
extern const char *annotation##_label; \
__asm__ volatile goto (".byte 0xeb; .byte "LABEL_REFERENCE_LENGTH"; \
mov _GLOBAL_OFFSET_TABLE_,%"LABEL_REFERENCE_REGISTER"; \
bsf "ANNOT_LBL(annotation, LABEL_REFERENCE_REGISTER)", \
%"LABEL_REFERENCE_REGISTER"; \
bsf " ANNOT_LBL(annotation, LABEL_REFERENCE_REGISTER) ", \
%" LABEL_REFERENCE_REGISTER "; \
jmp %l0;" \
::: LABEL_REFERENCE_REGISTER \
: native_run); \
Expand All @@ -242,8 +242,8 @@ do { \
extern const char *annotation##_label; \
__asm__ volatile goto (".byte 0xeb; .byte "LABEL_REFERENCE_LENGTH"; \
mov _GLOBAL_OFFSET_TABLE_,%"LABEL_REFERENCE_REGISTER"; \
bsr "ANNOT_LBL(annotation, LABEL_REFERENCE_REGISTER)", \
%"LABEL_REFERENCE_REGISTER"; \
bsr " ANNOT_LBL(annotation, LABEL_REFERENCE_REGISTER) ", \
%" LABEL_REFERENCE_REGISTER "; \
jmp %l0;" \
::: ANNOTATION_FUNCTION_CLOBBER_LIST \
: native_run); \
Expand Down

0 comments on commit ec2bbce

Please sign in to comment.