Commit 13193564 authored by Zhao Jiazhong's avatar Zhao Jiazhong Committed by Commit Bot

[mips] Add missing functions due to former clean up.

Patch af608d4b https://crrev.com/c/1903969 removed some functions used on mips platform.

Original Commit Message:

  [utils] Remove unused classes and functions

  This removes dead classes and functions from utils.h.

Change-Id: I558de38370b51a3f7dd0ea9712d9c9dc47fa05a1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1909747
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64927}
parent 97bda678
......@@ -693,9 +693,26 @@ class Simulator : public SimulatorBase {
LocalMonitor local_monitor_;
GlobalMonitor::LinkedAddress global_monitor_thread_;
};
#endif // defined(USE_SIMULATOR)
template <typename T>
int Compare(const T& a, const T& b) {
if (a == b)
return 0;
else if (a < b)
return -1;
else
return 1;
}
// Returns the negative absolute value of its argument.
template <typename T,
typename = typename std::enable_if<std::is_signed<T>::value>::type>
T Nabs(T a) {
return a < 0 ? a : -a;
}
} // namespace internal
} // namespace v8
#endif // defined(USE_SIMULATOR)
#endif // V8_EXECUTION_MIPS_SIMULATOR_MIPS_H_
......@@ -716,9 +716,26 @@ class Simulator : public SimulatorBase {
LocalMonitor local_monitor_;
GlobalMonitor::LinkedAddress global_monitor_thread_;
};
#endif // defined(USE_SIMULATOR)
template <typename T>
int Compare(const T& a, const T& b) {
if (a == b)
return 0;
else if (a < b)
return -1;
else
return 1;
}
// Returns the negative absolute value of its argument.
template <typename T,
typename = typename std::enable_if<std::is_signed<T>::value>::type>
T Nabs(T a) {
return a < 0 ? a : -a;
}
} // namespace internal
} // namespace v8
#endif // defined(USE_SIMULATOR)
#endif // V8_EXECUTION_MIPS64_SIMULATOR_MIPS64_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment