Add HLEPrefixNone/HLEPrefixLock/HLEPrefixAny/HLEPrefixRelease
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 21 Feb 2012 18:09:48 +0000 (18:09 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 21 Feb 2012 18:09:48 +0000 (18:09 +0000)
gas/

2012-02-21  H.J. Lu  <hongjiu.lu@intel.com>

* config/tc-i386.c (check_hle): Use HLEPrefixNone, HLEPrefixLock,
HLEPrefixAny and HLEPrefixRelease.

opcodes/

2012-02-21  H.J. Lu  <hongjiu.lu@intel.com>

* i386-opc.h (HLEPrefixNone): New.
(HLEPrefixLock): Likewise.
(HLEPrefixAny): Likewise.
(HLEPrefixRelease): Likewise.

gas/ChangeLog
gas/config/tc-i386.c
opcodes/ChangeLog
opcodes/i386-opc.h

index 619c1f95f74c03386e4b36963ee30d9f1589347d..6293433edc3b3895bd66d3dc1ed88a61ecfb7708 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/tc-i386.c (check_hle): Use HLEPrefixNone, HLEPrefixLock,
+       HLEPrefixAny and HLEPrefixRelease.
+
 2012-02-21  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
 
        * gas/config/tc-arm.h (DOUBLESLASH_LINE_COMMENTS): Define.
index 97cb68e02acd458da3ea3af9de5f0ac829e0a41a..144883e8784c0d52130f8015e0687974a203c0ea 100644 (file)
@@ -3015,7 +3015,7 @@ check_hle (void)
     {
     default:
       abort ();
-    case 0:
+    case HLEPrefixNone:
       if (i.prefix[HLE_PREFIX] == XACQUIRE_PREFIX_OPCODE)
        as_bad (_("invalid instruction `%s' after `xacquire'"),
                i.tm.name);
@@ -3023,7 +3023,7 @@ check_hle (void)
        as_bad (_("invalid instruction `%s' after `xrelease'"),
                i.tm.name);
       return 0;
-    case 1:
+    case HLEPrefixLock:
       if (i.prefix[LOCK_PREFIX])
        return 1;
       if (i.prefix[HLE_PREFIX] == XACQUIRE_PREFIX_OPCODE)
@@ -3031,9 +3031,9 @@ check_hle (void)
       else
        as_bad (_("missing `lock' with `xrelease'"));
       return 0;
-    case 2:
+    case HLEPrefixAny:
       return 1;
-    case 3:
+    case HLEPrefixRelease:
       if (i.prefix[HLE_PREFIX] != XRELEASE_PREFIX_OPCODE)
        {
          as_bad (_("instruction `%s' after `xacquire' not allowed"),
index 4c8ad0161e2f09479a85375c4f9c7ae890c09590..b3f5c76101491ec1b69eb167df39705466542af4 100644 (file)
@@ -1,3 +1,10 @@
+2012-02-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * i386-opc.h (HLEPrefixNone): New.
+       (HLEPrefixLock): Likewise.
+       (HLEPrefixAny): Likewise.
+       (HLEPrefixRelease): Likewise.
+
 2012-02-08  H.J. Lu  <hongjiu.lu@intel.com>
 
        * i386-dis.c (HLE_Fixup1): New.
index 245060e840a11812cb7987041a3f0418ef6e9722..f130a96ce87f6c05f7cdce16eed044dc02581a3a 100644 (file)
@@ -304,6 +304,10 @@ enum
      2. With or without a LOCK prefix.
      3. With a RELEASE (0xf3) prefix.
    */
+#define HLEPrefixNone          0
+#define HLEPrefixLock          1
+#define HLEPrefixAny           2
+#define HLEPrefixRelease       3
   HLEPrefixOk,
   /* Convert to DWORD */
   ToDword,