From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D24743851C38; Wed, 3 Jun 2020 12:54:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D24743851C38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1591188892; bh=DOmLXchdWSSJhSCaaAU3gdO9rUjFVUKKMibqei1g5z8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=M6Hvw2cWGQIfyB6Ir7E25lIPxhAjwSgYkhafHYm+A75RcMMuz8TBIgj3uK+i7JPmi cltLkeLP5McggnJ2l/rq8DAhpxclh3Tq9zuHAtZC6xfrOamMU8BWCJbgDMmA20PXAv zf7sWzPlOnLEET2JiquQeY873flW2yZmNp7zfdDU= From: "bouanto at zoho dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug jit/87291] Add support for inline asm to libgccjit Date: Wed, 03 Jun 2020 12:54:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: jit X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bouanto at zoho dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 12:54:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D87291 bouanto at zoho dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bouanto at zoho dot com --- Comment #2 from bouanto at zoho dot com --- I'd like to have inline asm support as well. I would see an API like this: For global asm: gcc_jit_context_add_module_asm(gcc_jit_context* ctxt, gcc_jit_location* loc, const char* asm) For local (in function) asm: gcc_jit_function* gcc_jit_block_add_inline_asm(gcc_jit_block* block, gcc_jit_location* loc, gcc_jit_type* return_type, int num_params, gcc_jit_params** params, const char* asm, const char* constraints, bool has_side_effects, bool align_stack, enum gcc_jit_asm_dialect dialect) This will return a function that can then be called as usual with gcc_jit_context_new_call. The return type of the function can either be voi= d, a single value or a struct depending on the constraints. In my case I would need the asm dialects Intel and ATT. Maybe has_side_effects and align_stack could be rvalues: I'm not sure. Thanks.=