Skip to content

Commit

Permalink
AArch64: Vector bitwise OR operation
Browse files Browse the repository at this point in the history
This commit adds AArch64 implementation for vector bitwise OR
operation. This implementation is for the following data type-
- VectorInt8

Signed-off-by: Md. Alvee Noor <mnoor@unb.ca>
  • Loading branch information
alvee-unb committed May 7, 2021
1 parent 0d7fc8c commit 7c65f12
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions compiler/aarch64/codegen/ARM64Debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ static const char *opCodeToNameMap[] =
"vfdiv4s",
"vfdiv2d",
"vand16b",
"vorr16b",
"nop",
"proc",
"fence",
Expand Down
16 changes: 16 additions & 0 deletions compiler/aarch64/codegen/BinaryEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,22 @@ OMR::ARM64::TreeEvaluator::vandEvaluator(TR::Node *node, TR::CodeGenerator *cg)
return inlineVectorBinaryOp(node, cg, andOp);
}

TR::Register *
OMR::ARM64::TreeEvaluator::vorEvaluator(TR::Node *node, TR::CodeGenerator *cg)
{
TR::InstOpCode::Mnemonic orrOp;
switch(node->getDataType())
{
case TR::VectorInt8:
orrOp = TR::InstOpCode::vorr16b;
break;
default:
TR_ASSERT(false, "unrecognized vector type %s\n", node->getDataType().toString());
return NULL;
}
return inlineVectorBinaryOp(node, cg, orrOp);
}

// Multiply a register by a 32-bit constant
static void mulConstant32(TR::Node *node, TR::Register *treg, TR::Register *sreg, int32_t value, TR::CodeGenerator *cg)
{
Expand Down
1 change: 1 addition & 0 deletions compiler/aarch64/codegen/OMRInstOpCodeEnum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@
vfdiv4s, /* 0x6E20FC00 FDIV */
vfdiv2d, /* 0x6E60FC00 FDIV */
vand16b, /* 0x4E201C00 AND */
vorr16b, /* 0x4EA01C00 ORR */
/* Hint instructions */
nop, /* 0xD503201F NOP */
/* Internal OpCodes */
Expand Down
2 changes: 1 addition & 1 deletion compiler/aarch64/codegen/OMRTreeEvaluatorTable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@
#define _vdivEvaluator TR::TreeEvaluator::vdivEvaluator
#define _vremEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _vandEvaluator TR::TreeEvaluator::vandEvaluator
#define _vorEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _vorEvaluator TR::TreeEvaluator::vorEvaluator
#define _vxorEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _vshlEvaluator TR::TreeEvaluator::unImpOpEvaluator
#define _vushrEvaluator TR::TreeEvaluator::unImpOpEvaluator
Expand Down
1 change: 1 addition & 0 deletions compiler/aarch64/codegen/OpBinary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ const OMR::ARM64::InstOpCode::OpCodeBinaryEntry OMR::ARM64::InstOpCode::binaryEn
0x6E20FC00, /* FDIV vfdiv4s */
0x6E60FC00, /* FDIV vfdiv2d */
0x4E201C00, /* AND vand16b */
0x4EA01C00, /* ORR vorr16b */
/* Hint instructions */
0xD503201F, /* NOP nop */
};

0 comments on commit 7c65f12

Please sign in to comment.