[PATCH] Improve diagnostics for asm immediate constraints and downgrade from error to default-error

Joerg Sonnenberger joerg at NetBSD.org
Fri Jan 16 11:48:13 PST 2015


Also, using functions gives better typing in terms of documentation, so it seems reasonable to continue to support that.
For optimality I meant things like:

  unsigned char inb (unsigned short int __port)
  {
    unsigned char _v;
  
    if (__builtin_constant_p(__port) && __port < 256)
      __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"N" (__port));
    else
      __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"d" (__port));
    return _v;
  }


http://reviews.llvm.org/D7014

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






More information about the cfe-commits mailing list