[PATCH] [Clang - ARM/AArch64] Add ACLE special register intrinsics (10.1)

Luke Cheeseman luke.cheeseman at arm.com
Fri Jun 5 07:14:30 PDT 2015


Hi Renato,

Thanks for the suggestions, I will apply them right away. I have one concern with respect to the semantic checking however, currently if an invalid register string is passed to one of the intrinsics the semantic checking won't detect this and so will not provide the user with a diagnostic. Instead, the error will occur in the backend when the write_register or read_register is to be lowered but cannot be done so successfully and a fatal error will occur (through report_fatal_error). For example:

  $ cat tmp.c
  #include <arm_acle.h>
  
  unsigned read_notareg() {
    return __arm_rsr("notareg");
  }
  
  $ clang tmp.c -target arm-none-none-eabi -S
  fatal error: error in backend: Invalid register name "notareg".
  (error and bug report)

Is this acceptable? I believe those kinds of errors are for invalid user input. I couldn't think of way to check the possible strings in the semantic checking that would avoid bringing most of the logic into the frontend and so was wondering if you had any suggestions on the matter.

Thanks,
Luke


http://reviews.llvm.org/D9697

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list