[Groonga-commit] groonga/grnxx at 63cf1f1 [master] Add "cc" to inline assembly in Int because status flags are modified. (#88)

Back to archive index

susumu.yata null+****@clear*****
Fri Oct 24 13:22:28 JST 2014


susumu.yata	2014-10-24 13:22:28 +0900 (Fri, 24 Oct 2014)

  New Revision: 63cf1f106862891f82d52fa0a2bbb6a0440382ea
  https://github.com/groonga/grnxx/commit/63cf1f106862891f82d52fa0a2bbb6a0440382ea

  Message:
    Add "cc" to inline assembly in Int because status flags are modified. (#88)

  Modified files:
    include/grnxx/new_types/int.hpp

  Modified: include/grnxx/new_types/int.hpp (+6 -3)
===================================================================
--- include/grnxx/new_types/int.hpp    2014-10-24 12:50:16 +0900 (30c0f56)
+++ include/grnxx/new_types/int.hpp    2014-10-24 13:22:28 +0900 (33e6f8c)
@@ -251,7 +251,8 @@ class Int {
              "MOV %2, %0;"
              "GRNXX_INT_ADD_OVERFLOW%=:"
              : "+r" (lhs.value_)
-             : "r" (rhs.value_), "r" (na_value()));
+             : "r" (rhs.value_), "r" (na_value())
+             : "cc");
     return lhs;
   }
   static Int subtract(Int lhs, Int rhs) {
@@ -263,7 +264,8 @@ class Int {
              "MOV %2, %0;"
              "GRNXX_INT_SUBTRACT_OVERFLOW%=:"
              : "+r" (lhs.value_)
-             : "r" (rhs.value_), "r" (na_value()));
+             : "r" (rhs.value_), "r" (na_value())
+             : "cc");
     return lhs;
   }
   static Int multiply(Int lhs, Int rhs) {
@@ -275,7 +277,8 @@ class Int {
              "MOV %2, %0;"
              "GRNXX_INT_MULTIPLY_OVERFLOW%=:"
              : "+r" (lhs.value_)
-             : "r" (rhs.value_), "r" (na_value()));
+             : "r" (rhs.value_), "r" (na_value())
+             : "cc");
     return lhs;
   }
  #else  // !defined(GRNXX_HAVE_GNUC)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index