From 75f55d559a87d669e5748a3a858e281e426013d6 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 18 Nov 2015 16:25:38 +0000 Subject: [PATCH] [WebAssembly] Add some spaces to the assembly output to vertically align operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253468 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../WebAssembly/WebAssemblyInstrFloat.td | 28 +++++++++---------- .../WebAssembly/WebAssemblyInstrInteger.td | 24 ++++++++-------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/lib/Target/WebAssembly/WebAssemblyInstrFloat.td b/lib/Target/WebAssembly/WebAssemblyInstrFloat.td index 59d2e6b474e..33efbb350cb 100644 --- a/lib/Target/WebAssembly/WebAssemblyInstrFloat.td +++ b/lib/Target/WebAssembly/WebAssemblyInstrFloat.td @@ -12,18 +12,18 @@ /// //===----------------------------------------------------------------------===// -defm ADD : BinaryFP; -defm SUB : BinaryFP; -defm MUL : BinaryFP; -defm DIV : BinaryFP; +defm ADD : BinaryFP; +defm SUB : BinaryFP; +defm MUL : BinaryFP; +defm DIV : BinaryFP; defm SQRT : UnaryFP; -defm ABS : UnaryFP; -defm NEG : UnaryFP; +defm ABS : UnaryFP; +defm NEG : UnaryFP; defm COPYSIGN : BinaryFP; -defm MIN : BinaryFP; -defm MAX : BinaryFP; +defm MIN : BinaryFP; +defm MAX : BinaryFP; defm CEIL : UnaryFP; defm FLOOR : UnaryFP; @@ -34,12 +34,12 @@ defm NEAREST : UnaryFP; def : Pat<(frint f32:$src), (NEAREST_F32 f32:$src)>; def : Pat<(frint f64:$src), (NEAREST_F64 f64:$src)>; -defm EQ : ComparisonFP; -defm NE : ComparisonFP; -defm LT : ComparisonFP; -defm LE : ComparisonFP; -defm GT : ComparisonFP; -defm GE : ComparisonFP; +defm EQ : ComparisonFP; +defm NE : ComparisonFP; +defm LT : ComparisonFP; +defm LE : ComparisonFP; +defm GT : ComparisonFP; +defm GE : ComparisonFP; // Don't care floating-point comparisons, supported via other comparisons. def : Pat<(seteq f32:$lhs, f32:$rhs), (EQ_F32 f32:$lhs, f32:$rhs)>; diff --git a/lib/Target/WebAssembly/WebAssemblyInstrInteger.td b/lib/Target/WebAssembly/WebAssemblyInstrInteger.td index 65a9f0c19b4..1d634dfae08 100644 --- a/lib/Target/WebAssembly/WebAssemblyInstrInteger.td +++ b/lib/Target/WebAssembly/WebAssemblyInstrInteger.td @@ -12,22 +12,24 @@ /// //===----------------------------------------------------------------------===// -defm ADD : BinaryInt; -defm SUB : BinaryInt; -defm MUL : BinaryInt; +// The spaces after the names are for aesthetic purposes only, to make +// operands line up vertically after tab expansion. +defm ADD : BinaryInt; +defm SUB : BinaryInt; +defm MUL : BinaryInt; defm DIV_S : BinaryInt; defm DIV_U : BinaryInt; defm REM_S : BinaryInt; defm REM_U : BinaryInt; -defm AND : BinaryInt; -defm OR : BinaryInt; -defm XOR : BinaryInt; -defm SHL : BinaryInt; +defm AND : BinaryInt; +defm OR : BinaryInt; +defm XOR : BinaryInt; +defm SHL : BinaryInt; defm SHR_U : BinaryInt; defm SHR_S : BinaryInt; -defm EQ : ComparisonInt; -defm NE : ComparisonInt; +defm EQ : ComparisonInt; +defm NE : ComparisonInt; defm LT_S : ComparisonInt; defm LE_S : ComparisonInt; defm LT_U : ComparisonInt; @@ -37,8 +39,8 @@ defm GE_S : ComparisonInt; defm GT_U : ComparisonInt; defm GE_U : ComparisonInt; -defm CLZ : UnaryInt; -defm CTZ : UnaryInt; +defm CLZ : UnaryInt; +defm CTZ : UnaryInt; defm POPCNT : UnaryInt; // Expand the "don't care" operations to supported operations. -- 2.34.1