Skip to content

Commit

Permalink
Update clang tools to version 11+ (#87)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Nickolls <[email protected]>
  • Loading branch information
mmc28a and snickolls-arm authored Feb 1, 2024
1 parent 2decd2c commit 1a2c1d3
Show file tree
Hide file tree
Showing 68 changed files with 350 additions and 299 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ software is also required:

1. Git
2. [Google's `cpplint.py`][cpplint]
3. clang-format-4.0
4. clang-tidy-4.0
3. clang-format 11+
4. clang-tidy 11+

Refer to the 'Usage' section for details.

Expand Down
3 changes: 1 addition & 2 deletions benchmarks/aarch64/bench-branch-link-masm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "bench-utils.h"
#include "globals-vixl.h"

#include "aarch64/instructions-aarch64.h"
#include "aarch64/macro-assembler-aarch64.h"

#include "bench-utils.h"

using namespace vixl;
using namespace vixl::aarch64;

Expand Down
3 changes: 1 addition & 2 deletions benchmarks/aarch64/bench-branch-link.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "bench-utils.h"
#include "globals-vixl.h"

#include "aarch64/instructions-aarch64.h"
#include "aarch64/macro-assembler-aarch64.h"

#include "bench-utils.h"

using namespace vixl;
using namespace vixl::aarch64;

Expand Down
3 changes: 1 addition & 2 deletions benchmarks/aarch64/bench-branch-masm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "bench-utils.h"
#include "globals-vixl.h"

#include "aarch64/instructions-aarch64.h"
#include "aarch64/macro-assembler-aarch64.h"

#include "bench-utils.h"

using namespace vixl;
using namespace vixl::aarch64;

Expand Down
3 changes: 1 addition & 2 deletions benchmarks/aarch64/bench-branch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "bench-utils.h"
#include "globals-vixl.h"

#include "aarch64/instructions-aarch64.h"
#include "aarch64/macro-assembler-aarch64.h"

#include "bench-utils.h"

using namespace vixl;
using namespace vixl::aarch64;

Expand Down
3 changes: 1 addition & 2 deletions benchmarks/aarch64/bench-dataop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "bench-utils.h"
#include "globals-vixl.h"

#include "aarch64/instructions-aarch64.h"
#include "aarch64/macro-assembler-aarch64.h"

#include "bench-utils.h"

using namespace vixl;
using namespace vixl::aarch64;

Expand Down
3 changes: 1 addition & 2 deletions benchmarks/aarch64/bench-mixed-disasm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "bench-utils.h"
#include "globals-vixl.h"

#include "aarch64/instructions-aarch64.h"
#include "aarch64/macro-assembler-aarch64.h"

#include "bench-utils.h"

using namespace vixl;
using namespace vixl::aarch64;

Expand Down
3 changes: 1 addition & 2 deletions benchmarks/aarch64/bench-mixed-masm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "bench-utils.h"
#include "globals-vixl.h"

#include "aarch64/instructions-aarch64.h"
#include "aarch64/macro-assembler-aarch64.h"

#include "bench-utils.h"

using namespace vixl;
using namespace vixl::aarch64;

Expand Down
3 changes: 1 addition & 2 deletions benchmarks/aarch64/bench-mixed-sim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "bench-utils.h"
#include "globals-vixl.h"

#include "aarch64/instructions-aarch64.h"
#include "aarch64/macro-assembler-aarch64.h"
#include "aarch64/simulator-aarch64.h"

#include "bench-utils.h"

#ifdef VIXL_INCLUDE_SIMULATOR_AARCH64

using namespace vixl;
Expand Down
5 changes: 3 additions & 2 deletions benchmarks/aarch64/bench-utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "bench-utils.h"

#include <vector>

#include "globals-vixl.h"
#include "aarch64/macro-assembler-aarch64.h"

#include "bench-utils.h"
#include "aarch64/macro-assembler-aarch64.h"

using namespace vixl;
using namespace vixl::aarch64;
Expand Down
9 changes: 5 additions & 4 deletions benchmarks/aarch64/bench-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
#ifndef VIXL_AARCH64_BENCH_UTILS_H_
#define VIXL_AARCH64_BENCH_UTILS_H_

#include <list>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>

#include <list>
#include <vector>

#include "globals-vixl.h"

#include "aarch64/macro-assembler-aarch64.h"

class BenchTimer {
Expand Down Expand Up @@ -90,7 +90,8 @@ class BenchCLI {
}

char* end;
unsigned long run_time = strtoul(argv[1], &end, 0); // NOLINT(runtime/int)
unsigned long run_time = // NOLINT(google-runtime-int)
strtoul(argv[1], &end, 0);
if ((end == argv[1]) || (run_time > UINT32_MAX)) {
PrintUsage(argv[0]);
status_ = kExitFailure;
Expand Down Expand Up @@ -242,7 +243,7 @@ class BenchCodeGenerator {
vixl::aarch64::MacroAssembler* masm_;

// State for *rand48(), used to randomise code generation.
unsigned short rand_state_[3]; // NOLINT(runtime/int)
unsigned short rand_state_[3]; // NOLINT(google-runtime-int)

uint32_t rnd_;
int rnd_bits_;
Expand Down
3 changes: 2 additions & 1 deletion examples/aarch64/custom-disassembler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "custom-disassembler.h"

#include <regex>

#include "custom-disassembler.h"
#include "examples.h"

using namespace vixl;
Expand Down
1 change: 1 addition & 0 deletions examples/aarch64/disasm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <string.h>

#include "code-buffer-vixl.h"

#include "aarch64/decoder-aarch64.h"
#include "aarch64/disasm-aarch64.h"

Expand Down
4 changes: 2 additions & 2 deletions examples/aarch64/getting-started.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "executable-memory.h"

#include "aarch64/macro-assembler-aarch64.h"
#include "aarch64/simulator-aarch64.h"

#include "executable-memory.h"

using namespace vixl;
using namespace vixl::aarch64;

Expand Down
2 changes: 2 additions & 0 deletions examples/aarch64/literal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ int64_t LiteralExample(int64_t a, int64_t b) {
b,
simulator.ReadXRegister(0));

free(code);

return simulator.ReadXRegister(0);
}
#endif
Expand Down
3 changes: 2 additions & 1 deletion examples/aarch64/non-const-visitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "non-const-visitor.h"

#include <regex>

#include "examples.h"
#include "non-const-visitor.h"

using namespace vixl;
using namespace vixl::aarch64;
Expand Down
4 changes: 2 additions & 2 deletions src/aarch64/abi-aarch64.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ template <>
inline GenericOperand ABI::GetReturnGenericOperand<void>() const {
return GenericOperand();
}
}
} // namespace vixl::aarch64
} // namespace aarch64
} // namespace vixl

#endif // VIXL_AARCH64_ABI_AARCH64_H_

Expand Down
3 changes: 2 additions & 1 deletion src/aarch64/assembler-aarch64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#include "assembler-aarch64.h"

#include <cmath>

#include "assembler-aarch64.h"
#include "macro-assembler-aarch64.h"

namespace vixl {
Expand Down
1 change: 1 addition & 0 deletions src/aarch64/assembler-aarch64.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "../globals-vixl.h"
#include "../invalset-vixl.h"
#include "../utils-vixl.h"

#include "operands-aarch64.h"

namespace vixl {
Expand Down
5 changes: 3 additions & 2 deletions src/aarch64/cpu-features-auditor-aarch64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "cpu-features-auditor-aarch64.h"

#include "cpu-features.h"
#include "globals-vixl.h"
#include "utils-vixl.h"
#include "decoder-aarch64.h"

#include "cpu-features-auditor-aarch64.h"
#include "decoder-aarch64.h"

namespace vixl {
namespace aarch64 {
Expand Down
1 change: 1 addition & 0 deletions src/aarch64/cpu-features-auditor-aarch64.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <unordered_map>

#include "cpu-features.h"

#include "decoder-aarch64.h"
#include "decoder-visitor-map-aarch64.h"

Expand Down
1 change: 1 addition & 0 deletions src/aarch64/debugger-aarch64.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#ifndef VIXL_AARCH64_DEBUGGER_AARCH64_H_
#define VIXL_AARCH64_DEBUGGER_AARCH64_H_

#include <optional>
#include <unordered_set>
#include <vector>

Expand Down
3 changes: 2 additions & 1 deletion src/aarch64/decoder-aarch64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "decoder-aarch64.h"

#include <string>

#include "../globals-vixl.h"
#include "../utils-vixl.h"

#include "decoder-aarch64.h"
#include "decoder-constants-aarch64.h"

namespace vixl {
Expand Down
4 changes: 2 additions & 2 deletions src/aarch64/disasm-aarch64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "disasm-aarch64.h"

#include <bitset>
#include <cstdlib>
#include <sstream>

#include "disasm-aarch64.h"

namespace vixl {
namespace aarch64 {

Expand Down
1 change: 1 addition & 0 deletions src/aarch64/instructions-aarch64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "instructions-aarch64.h"

#include "assembler-aarch64.h"

namespace vixl {
Expand Down
14 changes: 7 additions & 7 deletions src/aarch64/instructions-aarch64.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,19 +147,19 @@ const unsigned kMTETagWidth = 4;

// Make these moved float constants backwards compatible
// with explicit vixl::aarch64:: namespace references.
using vixl::kDoubleMantissaBits;
using vixl::kDoubleExponentBits;
using vixl::kFloatMantissaBits;
using vixl::kFloatExponentBits;
using vixl::kFloat16MantissaBits;
using vixl::kDoubleMantissaBits;
using vixl::kFloat16ExponentBits;
using vixl::kFloat16MantissaBits;
using vixl::kFloatExponentBits;
using vixl::kFloatMantissaBits;

using vixl::kFP16PositiveInfinity;
using vixl::kFP16NegativeInfinity;
using vixl::kFP32PositiveInfinity;
using vixl::kFP16PositiveInfinity;
using vixl::kFP32NegativeInfinity;
using vixl::kFP64PositiveInfinity;
using vixl::kFP32PositiveInfinity;
using vixl::kFP64NegativeInfinity;
using vixl::kFP64PositiveInfinity;

using vixl::kFP16DefaultNaN;
using vixl::kFP32DefaultNaN;
Expand Down
9 changes: 4 additions & 5 deletions src/aarch64/macro-assembler-aarch64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <cctype>

#include "macro-assembler-aarch64.h"

#include <cctype>

namespace vixl {
namespace aarch64 {

Expand Down Expand Up @@ -194,9 +194,8 @@ void VeneerPool::Reset() {

void VeneerPool::Release() {
if (--monitor_ == 0) {
VIXL_ASSERT(IsEmpty() ||
masm_->GetCursorOffset() <
unresolved_branches_.GetFirstLimit());
VIXL_ASSERT(IsEmpty() || masm_->GetCursorOffset() <
unresolved_branches_.GetFirstLimit());
}
}

Expand Down
Loading

0 comments on commit 1a2c1d3

Please sign in to comment.