| Instruction | Name | RV32I | RV64I | RV128I | Syntax |
|---|---|---|---|---|---|
| Loads | |||||
| LB | Load Byte | Y | Y | Y | LB rd,rs1,imm |
| LH | Load Halfword | Y | Y | Y | LH rd,rs1,imm |
| LW | Load Word | Y | Y | Y | LW rd,rs1,imm |
| LD | Load Double | N | Y | Y | LD rd,rs,imm |
| LQ | Load Quad | N | N | Y | LQ rd,rs,imm |
| LBU | Load Byte Unsigned | Y | Y | Y | LBU rd,rs1,imm |
| LHU | Load Halfword Unsigned | Y | Y | Y | LHU rd,rs1,imm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # train_grpo.py | |
| import re | |
| import torch | |
| from datasets import load_dataset, Dataset | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| from peft import LoraConfig | |
| from trl import GRPOConfig, GRPOTrainer | |
| # Load and prep dataset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.0; | |
| // Chain adapter interface | |
| interface IChainAdapter { | |
| function getChainId() external view returns (uint256); | |
| function getNativeToken() external view returns (address); | |
| function getBridgeAddress() external view returns (address); | |
| function getFeeToken() external view returns (address); | |
| function getGasPrice() external view returns (uint256); |
| Register | ABI Name | Description |
|---|---|---|
| x0 | zero | zero register |
| x1 | ra | return address |
| x2 | sp | stack pointer |
| x3 | gp | global pointer |
| x4 | tp | thread pointer |
| x5 | t0 | temporary register |
| x6 | t1 | temporary register |
| x7 | t2 | temporary register |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.0; | |
| contract HashExample { | |
| function getHash(bytes memory data) public pure returns (bytes32) { | |
| return sha256(data); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Mnemonic | Instruction | Action | | |
| ADC Add with carry Rd := Rn + Op2 + Carry | |
| ADD Add Rd := Rn + Op2 | |
| AND AND Rd := Rn AND Op2 | |
| B Branch R15 := address | |
| BIC Bit Clear Rd := Rn AND NOT Op2 | |
| BL Branch with Link R14 := R15, R15 := address | |
| BX Branch and Exchange R15 := Rn, T bit := Rn[0] | |
| CDP Coprocesor Data Processing (Coprocessor-specific) |