blob: de79edf17bd5af8fc3eba228503bf5bc4aaa5d5c [file]
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// This file defines the isa for the push/pop example decoder.
disasm widths = {-18};
isa PushPopInst {
namespace mpact::sim::decoder::test;
slots { push_pop_inst; }
}
slot push_pop_inst {
includes {
#include "mpact/sim/decoder/test/push_pop.h"
}
default size = 2;
default opcode =
disasm: "IllegalInstruction",
semfunc: "&Illegal";
opcodes {
push{ : x2, spimm6, rlist, [rlist] : x2 },
resources: {x2, [rlist] : x2},
disasm: "push",
semfunc: "&Push";
pop{ : x2, spimm6, rlist : x2, [rlist] },
resources: { x2 : x2, [rlist]},
disasm: "pop",
semfunc: "&Pop";
}
}