@@ -1711,6 +1711,168 @@ void MicroAssembler::czeronez(Register rd, Register rs1, Register rs2) {
17111711 EmitRType (CZERO, rs2, rs1, CZERONEZ, rd, OP);
17121712}
17131713
1714+ void MicroAssembler::amoswapb (Register rd,
1715+ Register rs2,
1716+ Address addr,
1717+ std::memory_order order) {
1718+ ASSERT (addr.offset () == 0 );
1719+ ASSERT (Supports (RV_Zabha));
1720+ EmitRType (AMOSWAP, order, rs2, addr.base (), WIDTH8, rd, AMO);
1721+ }
1722+
1723+ void MicroAssembler::amoaddb (Register rd,
1724+ Register rs2,
1725+ Address addr,
1726+ std::memory_order order) {
1727+ ASSERT (addr.offset () == 0 );
1728+ ASSERT (Supports (RV_Zabha));
1729+ EmitRType (AMOADD, order, rs2, addr.base (), WIDTH8, rd, AMO);
1730+ }
1731+
1732+ void MicroAssembler::amoxorb (Register rd,
1733+ Register rs2,
1734+ Address addr,
1735+ std::memory_order order) {
1736+ ASSERT (addr.offset () == 0 );
1737+ ASSERT (Supports (RV_Zabha));
1738+ EmitRType (AMOXOR, order, rs2, addr.base (), WIDTH8, rd, AMO);
1739+ }
1740+
1741+ void MicroAssembler::amoandb (Register rd,
1742+ Register rs2,
1743+ Address addr,
1744+ std::memory_order order) {
1745+ ASSERT (addr.offset () == 0 );
1746+ ASSERT (Supports (RV_Zabha));
1747+ EmitRType (AMOAND, order, rs2, addr.base (), WIDTH8, rd, AMO);
1748+ }
1749+
1750+ void MicroAssembler::amoorb (Register rd,
1751+ Register rs2,
1752+ Address addr,
1753+ std::memory_order order) {
1754+ ASSERT (addr.offset () == 0 );
1755+ ASSERT (Supports (RV_Zabha));
1756+ EmitRType (AMOOR, order, rs2, addr.base (), WIDTH8, rd, AMO);
1757+ }
1758+
1759+ void MicroAssembler::amominb (Register rd,
1760+ Register rs2,
1761+ Address addr,
1762+ std::memory_order order) {
1763+ ASSERT (addr.offset () == 0 );
1764+ ASSERT (Supports (RV_Zabha));
1765+ EmitRType (AMOMIN, order, rs2, addr.base (), WIDTH8, rd, AMO);
1766+ }
1767+
1768+ void MicroAssembler::amomaxb (Register rd,
1769+ Register rs2,
1770+ Address addr,
1771+ std::memory_order order) {
1772+ ASSERT (addr.offset () == 0 );
1773+ ASSERT (Supports (RV_Zabha));
1774+ EmitRType (AMOMAX, order, rs2, addr.base (), WIDTH8, rd, AMO);
1775+ }
1776+
1777+ void MicroAssembler::amominub (Register rd,
1778+ Register rs2,
1779+ Address addr,
1780+ std::memory_order order) {
1781+ ASSERT (addr.offset () == 0 );
1782+ ASSERT (Supports (RV_Zabha));
1783+ EmitRType (AMOMINU, order, rs2, addr.base (), WIDTH8, rd, AMO);
1784+ }
1785+
1786+ void MicroAssembler::amomaxub (Register rd,
1787+ Register rs2,
1788+ Address addr,
1789+ std::memory_order order) {
1790+ ASSERT (addr.offset () == 0 );
1791+ ASSERT (Supports (RV_Zabha));
1792+ EmitRType (AMOMAXU, order, rs2, addr.base (), WIDTH8, rd, AMO);
1793+ }
1794+
1795+ void MicroAssembler::amoswaph (Register rd,
1796+ Register rs2,
1797+ Address addr,
1798+ std::memory_order order) {
1799+ ASSERT (addr.offset () == 0 );
1800+ ASSERT (Supports (RV_Zabha));
1801+ EmitRType (AMOSWAP, order, rs2, addr.base (), WIDTH16, rd, AMO);
1802+ }
1803+
1804+ void MicroAssembler::amoaddh (Register rd,
1805+ Register rs2,
1806+ Address addr,
1807+ std::memory_order order) {
1808+ ASSERT (addr.offset () == 0 );
1809+ ASSERT (Supports (RV_Zabha));
1810+ EmitRType (AMOADD, order, rs2, addr.base (), WIDTH16, rd, AMO);
1811+ }
1812+
1813+ void MicroAssembler::amoxorh (Register rd,
1814+ Register rs2,
1815+ Address addr,
1816+ std::memory_order order) {
1817+ ASSERT (addr.offset () == 0 );
1818+ ASSERT (Supports (RV_Zabha));
1819+ EmitRType (AMOXOR, order, rs2, addr.base (), WIDTH16, rd, AMO);
1820+ }
1821+
1822+ void MicroAssembler::amoandh (Register rd,
1823+ Register rs2,
1824+ Address addr,
1825+ std::memory_order order) {
1826+ ASSERT (addr.offset () == 0 );
1827+ ASSERT (Supports (RV_Zabha));
1828+ EmitRType (AMOAND, order, rs2, addr.base (), WIDTH16, rd, AMO);
1829+ }
1830+
1831+ void MicroAssembler::amoorh (Register rd,
1832+ Register rs2,
1833+ Address addr,
1834+ std::memory_order order) {
1835+ ASSERT (addr.offset () == 0 );
1836+ ASSERT (Supports (RV_Zabha));
1837+ EmitRType (AMOOR, order, rs2, addr.base (), WIDTH16, rd, AMO);
1838+ }
1839+
1840+ void MicroAssembler::amominh (Register rd,
1841+ Register rs2,
1842+ Address addr,
1843+ std::memory_order order) {
1844+ ASSERT (addr.offset () == 0 );
1845+ ASSERT (Supports (RV_Zabha));
1846+ EmitRType (AMOMIN, order, rs2, addr.base (), WIDTH16, rd, AMO);
1847+ }
1848+
1849+ void MicroAssembler::amomaxh (Register rd,
1850+ Register rs2,
1851+ Address addr,
1852+ std::memory_order order) {
1853+ ASSERT (addr.offset () == 0 );
1854+ ASSERT (Supports (RV_Zabha));
1855+ EmitRType (AMOMAX, order, rs2, addr.base (), WIDTH16, rd, AMO);
1856+ }
1857+
1858+ void MicroAssembler::amominuh (Register rd,
1859+ Register rs2,
1860+ Address addr,
1861+ std::memory_order order) {
1862+ ASSERT (addr.offset () == 0 );
1863+ ASSERT (Supports (RV_Zabha));
1864+ EmitRType (AMOMINU, order, rs2, addr.base (), WIDTH16, rd, AMO);
1865+ }
1866+
1867+ void MicroAssembler::amomaxuh (Register rd,
1868+ Register rs2,
1869+ Address addr,
1870+ std::memory_order order) {
1871+ ASSERT (addr.offset () == 0 );
1872+ ASSERT (Supports (RV_Zabha));
1873+ EmitRType (AMOMAXU, order, rs2, addr.base (), WIDTH16, rd, AMO);
1874+ }
1875+
17141876void MicroAssembler::lb (Register rd, Address addr, std::memory_order order) {
17151877 ASSERT (addr.offset () == 0 );
17161878 ASSERT ((order == std::memory_order_acquire) ||
0 commit comments