P4C
The P4 Compiler
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
StatefulAlu Namespace Reference

Classes

struct  AluOP
 
struct  BitOP
 
struct  CmpOP
 
struct  DivMod
 
struct  MinMax
 
struct  operand
 
struct  OutOP
 
struct  SaluInstruction
 
struct  TMatchOP
 

Enumerations

enum  salu_slot_use {
  CMP0 , CMP1 , CMP2 , CMP3 ,
  ALU2LO , ALU1LO , ALU2HI , ALU1HI ,
  ALUOUT0 , ALUOUT1 , ALUOUT2 , ALUOUT3 ,
  MINMAX , CMPLO = CMP0 , CMPHI = CMP1 , ALUOUT = ALUOUT0
}
 

Functions

InstructiongenNoop (StatefulTable *tbl, Table::Actions::Action *act)
 

Variables

static AluOP::Decode opA ("alu_a", 0x0c, &opB, "a", AluOP::Decode::A)
 
static AluOP::Decode opAND ("and", 0x08, true)
 
static AluOP::Decode opANDCA ("andca", 0x02)
 
static AluOP::Decode opANDCB ("andcb", 0x04, &opANDCA)
 
static AluOP::Decode opB ("alu_b", 0x0a, "b", AluOP::Decode::B)
 
static BitOP::Decode opCLR_BIT ("clr_bit", 0x2)
 
static BitOP::Decode opCLR_BIT_AT ("clr_bit_at", 0x8)
 
static BitOP::Decode opCLR_BITC ("clr_bitc", 0x3)
 
static BitOP::Decode opCLR_BITC_AT ("clr_bitc_at", 0x9)
 
DivMod::Decode opDIVMOD ("divmod", JBAY, 0x00)
 
static CmpOP::Decode opGEQ ("geq", 2, true)
 
static CmpOP::Decode opGRT ("grt", 0, true)
 
static CmpOP::Decode opLEQ ("leq", 1, true)
 
static CmpOP::Decode opLSS ("lss", 3, true)
 
MinMax::Decode opMAX16 ("max16", JBAY, 3)
 
MinMax::Decode opMAX8 ("max8", JBAY, 1)
 
static AluOP::Decode opMAXS ("maxs", 0x17, true)
 
static AluOP::Decode opMAXU ("maxu", 0x16, true)
 
MinMax::Decode opMIN16 ("min16", JBAY, 2)
 
MinMax::Decode opMIN8 ("min8", JBAY, 0)
 
static AluOP::Decode opMINS ("mins", 0x15, true)
 
static AluOP::Decode opMINU ("minu", 0x14, true)
 
static AluOP::Decode opNAND ("nand", 0x07, true)
 
static CmpOP::Decode opNEQ ("neq", 1, false)
 
static AluOP::Decode opNOP ("nop", 0x18, true, AluOP::Decode::NONE)
 
static AluOP::Decode opNOR ("nor", 0x01, true)
 
static AluOP::Decode opNOTA ("nota", 0x03, "not", AluOP::Decode::A)
 
static AluOP::Decode opNOTB ("notb", 0x05, &opNOTA, AluOP::Decode::B)
 
static AluOP::Decode opOR ("or", 0x0e, true)
 
static AluOP::Decode opORCA ("orca", 0x0b)
 
static AluOP::Decode opORCB ("orcb", 0x0d, &opORCA)
 
static BitOP::Decode opREAD_BIT ("read_bit", 0x4)
 
static BitOP::Decode opREAD_BITC ("read_bitc", 0x5)
 
static AluOP::Decode opSADDS ("sadds", 0x11, true)
 
static AluOP::Decode opSADDU ("saddu", 0x10, true)
 
static BitOP::Decode opSET_BIT_AT ("set_bit_at", 0x6)
 
static BitOP::Decode opSET_BITC ("set_bitc", 0x1)
 
static BitOP::Decode opSET_BITC_AT ("set_bitc_at", 0x7)
 
static AluOP::Decode opSETHI ("sethi", 0x0f, true, AluOP::Decode::NONE)
 
static AluOP::Decode opSETZ ("setz", 0x00, true, AluOP::Decode::NONE)
 
static AluOP::Decode opSSUBRS ("ssubrs", 0x1b, &opSSUBS)
 
static AluOP::Decode opSSUBRU ("ssubru", 0x1a, &opSSUBU)
 
static AluOP::Decode opSSUBS ("ssubs", 0x13)
 
static AluOP::Decode opSSUBU ("ssubu", 0x12)
 
static AluOP::Decode opSUB ("sub", 0x1e)
 
static AluOP::Decode opSUBR ("subr", 0x1f, &opSUB)
 
static AluOP::Decode opXNOR ("xnor", 0x09, true)
 
static AluOP::Decode opXOR ("xor", 0x06, true)
 

Detailed Description

Copyright (C) 2024 Intel Corporation

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

http://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.

SPDX-License-Identifier: Apache-2.0