From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WC6CEOAwy2YVcAEAe85BDQ:P1 (envelope-from ) for ; Sun, 25 Aug 2024 15:25:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id WC6CEOAwy2YVcAEAe85BDQ (envelope-from ) for ; Sun, 25 Aug 2024 15:25:52 +0200 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=pkWhToTJ; dkim=pass header.d=johnnyrichard.com header.s=key1 header.b=hu37YNbd; dmarc=pass (policy=quarantine) header.from=johnnyrichard.com; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1724592352; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=72WR63ph96bimXjqHkx1dBKB+na4c8QezSqPOno10Ec=; b=VJc89OR3udQ1D1C0hiuui61Z3NdQ8mTeNKgBSeJtUQsF95hEepK/wIot4SMEnV4A5b7db/ vw3shb9s5EgssR9sRMSpwvuyxTsfRaPoFs4+Ck71CxrYa2kCvvjQgZkEUbKRKVteWWZKJ3 5gkit07ViQ7+2lAo2TkBl+JlmRCH2urRyEHLtyWULzgE0E+yGK+aa/Ju9LJXNos/1rT9G4 tmidDElx8UWAU3E3RaghrrV4ry6eXvRfE+ehBxcbLFGP+mqEgDDPZr7wxQRBQpdjsx//Rc bt/N24TgeppP0rHPH6W+jZuRdjhgY4ro1z+ZRy/NUWzOWLHHiOtB1/JlmRL6zw== ARC-Seal: i=1; s=key1; d=johnnyrichard.com; t=1724592352; a=rsa-sha256; cv=none; b=kgHPUnBNj/PbPeezyKiMSNRoz6ip90W1rSu4ejjfhUVEQdQM880Ilv9Q2BBqJ1ZR0B2k2o 6P9NJachHCJKGTar6Vu7w/hAOEwAMAYjaatO7yLYLagR9p5AwqvmOTcYd2F7ZO1Icssqfg dF2rITKuKJTEKYHFC632VXgLu0Kcy/FSex3wQh2gMX8+C97cc0yJxzVoz5qZm/WERHOpCJ DA4iA23vLOWWD+CpCGGrUh95vpU2oe+sME72VL4lKUJjD2oUNq7YSr24om/ovjnYo3lSsk sLah2i9ftgGo1USjFQBA6rr2Fjzp9TrysrM5iQ1xZH/vb6+KnyOZRLYaViYtMQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lists.sr.ht header.s=20240113 header.b=pkWhToTJ; dkim=pass header.d=johnnyrichard.com header.s=key1 header.b=hu37YNbd; dmarc=pass (policy=quarantine) header.from=johnnyrichard.com; spf=pass (aspmx1.migadu.com: domain of lists@sr.ht designates 46.23.81.152 as permitted sender) smtp.mailfrom=lists@sr.ht Received: from mail-a.sr.ht (mail-a.sr.ht [46.23.81.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C5FB1744F8 for ; Sun, 25 Aug 2024 15:25:48 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=4o5EfQG/bpR1fY2w54/AvvSwYkybVms/OpwYfqWm+Vs=; c=simple/simple; d=lists.sr.ht; h=From:To:Cc:Subject:Date:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1724592348; v=1; b=pkWhToTJ+faU/6mpRo7dxPZunzGSim9Vr5jOZ21/VnFb1+1MoMyDw6jjrqcWOrQncOoYq0e7 BfQBOSBJeCJ6ktXkRljMWkvxXWrihB5YuPOR0FFuw6lGgeuTwbybQFj9BuJ0USa690bHyZIpR+O 3Db+bK834l6Xt3Tc+UiEWgPV6hODe0IVb/ElCpWODEwHD/1pwGyDKrFqs7Mh58b6xl0bQJlLZOg r4RQmrxcU1x7V3zUAR1jIcvAUnmTObdsipJjIugSSrFtfbq9HTzuIKpM2ZtJW4mSsNCkG5Qr4SK 7CBcd/eiFj4n6NbYxsdkkIuDk0ubmnTX+KeQx4pW269JQ== Received: from lists.sr.ht (unknown [46.23.81.154]) by mail-a.sr.ht (Postfix) with ESMTPSA id 8218E201F8 for ; Sun, 25 Aug 2024 13:25:48 +0000 (UTC) Received: from out-184.mta1.migadu.com (out-184.mta1.migadu.com [95.215.58.184]) by mail-a.sr.ht (Postfix) with ESMTPS id C072C201F1 for <~johnnyrichard/olang-devel@lists.sr.ht>; Sun, 25 Aug 2024 13:25:47 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1724592347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=72WR63ph96bimXjqHkx1dBKB+na4c8QezSqPOno10Ec=; b=hu37YNbdZYLYU5q1fSShwsIxCO8zvhrOmBhzNlVVyPw9/4Fq/IPHSFbNlYIhjWOaCbDjLj aErqLhV9uMvJdE1O+mwfmuGdmM2WCD0QtqynyU8xRLYKYyKymuePXOZJVnb02gLJ3eAekf KdBNeRHVcGhuPqR1ZCJ7uKbyMrSk4PGnkj/s8w5O59QMZ0RX8O1QyRc4AW2JqzD5kmkfpY 9/fzMEpxvMITtckzhAJjF8uLHII9qhD2Vi9ieJGSlkJJBLRWyopbviWzsDm5Bcs0XHwHLG GQNrMUFnb+VUg0Qj87JaFFf+ssx/n1GgIF3HE3nWg5uwoPF/7CpHhmFzYPnLHw== From: Johnny Richard To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Johnny Richard Subject: [PATCH olang v2 0/2] codegen: x86_64: implement binary operations Date: Sun, 25 Aug 2024 15:16:42 +0200 Message-ID: <20240825132523.253490-1-johnny@johnnyrichard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Unsubscribe: List-Subscribe: List-Archive: Archived-At: List-Post: List-ID: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel.lists.sr.ht> Sender: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel@lists.sr.ht> X-Migadu-Flow: FLOW_IN X-Migadu-Country: NL X-Migadu-Spam-Score: -2.95 X-Spam-Score: -2.95 X-Migadu-Queue-Id: C5FB1744F8 X-Migadu-Scanner: mx11.migadu.com X-TUID: POiDypQx+/Gi NOTES This patchset supersedes v1: - Message-ID: 20240427121832.203068-1-johnny@johnnyrichard.com Johnny Richard (2): codegen: x86_64: extract function to emit expression codegen: x86_64: implement binary operations src/codegen_linux_x86_64.c | 255 +++++++++++++++++- src/parser.c | 2 +- .../tests/0002_binary_operator_addition.ol | 22 ++ .../0003_binary_operator_multiplication.ol | 22 ++ .../tests/0004_binary_operator_division.ol | 22 ++ .../tests/0005_binary_operator_reminder.ol | 22 ++ .../tests/0006_binary_operator_subtraction.ol | 22 ++ .../tests/0007_binary_operator_eq.ol | 22 ++ .../tests/0008_binary_operator_lt.ol | 22 ++ .../tests/0009_binary_operator_gt.ol | 22 ++ .../tests/0010_binary_operator_neq.ol | 22 ++ .../tests/0011_binary_operator_leq.ol | 22 ++ .../tests/0012_binary_operator_geq.ol | 22 ++ .../tests/0013_binary_operator_lshift.ol | 22 ++ .../tests/0014_binary_operator_rshift.ol | 22 ++ .../tests/0015_binary_operator_xor.ol | 22 ++ .../tests/0016_binary_operator_and.ol | 22 ++ .../tests/0017_binary_operator_or.ol | 22 ++ .../tests/0018_binary_operator_logical_and.ol | 22 ++ .../tests/0019_binary_operator_logical_or.ol | 22 ++ 20 files changed, 645 insertions(+), 8 deletions(-) create mode 100644 tests/integration/tests/0002_binary_operator_addition.ol create mode 100644 tests/integration/tests/0003_binary_operator_multiplication.ol create mode 100644 tests/integration/tests/0004_binary_operator_division.ol create mode 100644 tests/integration/tests/0005_binary_operator_reminder.ol create mode 100644 tests/integration/tests/0006_binary_operator_subtraction.ol create mode 100644 tests/integration/tests/0007_binary_operator_eq.ol create mode 100644 tests/integration/tests/0008_binary_operator_lt.ol create mode 100644 tests/integration/tests/0009_binary_operator_gt.ol create mode 100644 tests/integration/tests/0010_binary_operator_neq.ol create mode 100644 tests/integration/tests/0011_binary_operator_leq.ol create mode 100644 tests/integration/tests/0012_binary_operator_geq.ol create mode 100644 tests/integration/tests/0013_binary_operator_lshift.ol create mode 100644 tests/integration/tests/0014_binary_operator_rshift.ol create mode 100644 tests/integration/tests/0015_binary_operator_xor.ol create mode 100644 tests/integration/tests/0016_binary_operator_and.ol create mode 100644 tests/integration/tests/0017_binary_operator_or.ol create mode 100644 tests/integration/tests/0018_binary_operator_logical_and.ol create mode 100644 tests/integration/tests/0019_binary_operator_logical_or.ol base-commit: 7b032597a6009614c8032e88f16803555f41df71 -- 2.46.0