From patchwork Thu Feb 8 13:15:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 198395 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp158007dyd; Thu, 8 Feb 2024 05:16:40 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCVTp+Elwk0WCvXN72wzAccKZ+gDUXOsOihbk/AEo9XXg0KTaOUZ0sNBwjzyCz0yzK3hlqN7Nb+SDaG6JKWdX060qfFK2Q== X-Google-Smtp-Source: AGHT+IH1M4d6JRujb8NR/iTC7G5BHdaYgq5CLjFCSIKWgEzr8fr+7h9QwbIfsLR1uIhpXKqOcxUD X-Received: by 2002:a05:620a:1aa4:b0:785:9833:2342 with SMTP id bl36-20020a05620a1aa400b0078598332342mr4590116qkb.16.1707398200165; Thu, 08 Feb 2024 05:16:40 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1707398200; cv=pass; d=google.com; s=arc-20160816; b=yVMz8JftcHFNsl/nfviFuOcVjhrIAmfKB50+DuRIEwyC1XDbb8N48fjsGg43JfGoE+ uZuBwmdEdl+IzPudOk72fbOWw64AIgQUK1hGoIxvgIlbO/9m0l2bHk8XbUCJQKVc5V6l hC0Lc0088CdQwtwDcUn3wUwMcAfQATTuaNGU9qVmTo3d1VPg7KEV0E/GyfUyYep5EKfu Ut8rDiIV7O5Bk3VSUEJ93/Fnhfj/6gK4nypXdkCajwcr7VZQy1sFeJsfTJDoHr5t+SBn nsXcEBfKGSYHJ2mjohMz1eYKLgvbaEkdEx7234e2h9wD0YQAfSmTHkHZ7qE3sxp1vzUX pFRQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :subject:to:from:content-language:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature:arc-filter:dmarc-filter :delivered-to; bh=hSGOpCedjNq2Jwm2dM0CiVCTPc8vUHAoz6CSfwciYUU=; fh=kfKHeNIuAkh9cRLxUSuZy6WGNlg54/FXEyMc3LkeQC0=; b=oBDuGug6tQ7HnkO+O3f8klFXooLNYVRJSa0mWpeRT9WQBgNPf54hREKjND5hcqxLj7 Fs9B1FgCBmQJTTyYt7WiQHtUPR2Z3ejZUneSykuuKVOuuHT4R6ELKUq6mgSUnPZDrcdT 1iB+28S0QG7ZFMcRY3gr+Q1FyMXPaurezOKzt0QmgLyBFcIEGTdQZXw7DIEvPaCvRwOd LIxmgS0IU7GgOFQlAnQVgVX54ZXMx/YuiNJqnj53l4ehlHaP8LWEaUm2CwHhhzPZtRsn p5Qqy24Y1HhLRgX6tdNSW1PLBAwz+MrkUuH4XLfbPYjN7mFVJTp9AOjD3erWz2XaUv68 PIig==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@gjlay.de header.s=strato-dkim-0002 header.b=krSvW1D0; dkim=neutral (no key) header.i=@gjlay.de header.s=strato-dkim-0003; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" X-Forwarded-Encrypted: i=3; AJvYcCV1/qzhV2nYiQDm330Di5b7J7Jzi3bFFEcpNKYYKjnYpSzvyqQSAaGWnnxJPPtI/vuoQH/qkNrihzZZONSv+NYjPycVCQ== Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id xb17-20020a05620a5ad100b00785ae558226si172025qkn.231.2024.02.08.05.16.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 05:16:40 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gjlay.de header.s=strato-dkim-0002 header.b=krSvW1D0; dkim=neutral (no key) header.i=@gjlay.de header.s=strato-dkim-0003; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BDD8A3858439 for ; Thu, 8 Feb 2024 13:16:39 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.25]) by sourceware.org (Postfix) with ESMTPS id 6CEB13858C5F for ; Thu, 8 Feb 2024 13:15:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6CEB13858C5F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gjlay.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=gjlay.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6CEB13858C5F Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=85.215.255.25 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1707398158; cv=pass; b=k+BzEFWA1dHgqMpqzSMankC5i9de0DNyE3tlrq1UhTgxCy2g5996DMkO5cZ4UJxJPOq125P/rgePoUn5MkgeOVcLtQokYrcsw7e6LB+2dCPYUlJtWIijY0KIG17vnmx3lautU3JlfvTQpYFaVeZDYOMmi6gXmouzzBuvAts3E8g= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1707398158; c=relaxed/simple; bh=SWgID0XC/UTY388HLe4I2qFtRxJxqi2qDuSauiioFh4=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version:From: To:Subject; b=teheFI9AaO1Co+yI1DKwnETnbh3Vvzo0hkv9c4ya3ZxHrbi7QnBrlyqu1Gup6Fq+RyfghhHDpPpI/+hVx+u09l3cUrZrTcrPqJ6WX1ECM3r08SXwUDtFMGn0ao/uhyc/l0gYyIR9OzoGUjHfmXTmUNDJdScO+JLbb6Gsz1VFOR0= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1707398153; cv=none; d=strato.com; s=strato-dkim-0002; b=XcyAlRb9R8ZBZwRcsAAgpX0XGXLauHM2ldGPNn0ZRHzwi8aQI6+gPRJJOawaTHhzT/ fHBzfh8WIs2m56P3pB39tWm+jElqtNtgQO7VQskUNmJxzDOSBOPqifOoQgo0qpmJsZD2 gHkiiwwV71EJWjPHa1nKVmuSIhJ5iWk3n0mW2DScmx/rlB8xJyaLU6lksBLobQEQ2gwm cbbKvDnB939cFycw9twIjMMO8JuRovEao8lbYWLqFwbbk/IdR3yaRFGlLvcEg94NV+pF L1af1fTkTh6wyCyjoUNnPE+2z0+DBzZxvhYvPXaUj/2NxYUAw6iiLqtZkwZWbvGcPwcP pgIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1707398153; s=strato-dkim-0002; d=strato.com; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=hSGOpCedjNq2Jwm2dM0CiVCTPc8vUHAoz6CSfwciYUU=; b=PZrW6Ljod64uUBiQXbdy1NjSsTBXuUWwkBF1g+QL6+JyLbYJVqBdvFQNWbKS2z2Ged TnPHGG/yzTSMPTvbVMvaMrNG40Sa5OonDQKzohcGD/UjU74+8dXFUleKKf3fI2ZyY0xe mnwkkGqGR+JDsi0XLxhS9emw9r3vXhn8z3rL9sOXT2Qb3fPJBPupRlPagKe920d3qG0e GDxSresgrdbkkl+Ys+qJ0KSbi3D7M4dN1F8sy7i8ltIaAWlrtxxdriJe1bWLQLe7G/5j w+F3VPrOUmOcBjgwrdjWwkWbwaDm7fMd4QH90LMbEqdMsfeu2sxleB/+x5UfK7brbAOd SkmA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1707398153; s=strato-dkim-0002; d=gjlay.de; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=hSGOpCedjNq2Jwm2dM0CiVCTPc8vUHAoz6CSfwciYUU=; b=krSvW1D0OKfteSQWmkM+kGNutQP+l52ledKufTyFupBKH2I2WNueDsyLulNdYMJQFE hA2Svei5JBCS76nX4fGHlXWo8tgDpAky9t7UsgUIEE6XNTodupIyg1/TX0MyPUl7QCUI 7Wd3lWp8iHKIbtcQlkDrLZEiXyDcu8uB8dDiqBvVdNZqkAJBQJ6lo56GiRDjFe+7CPmF J4PYyrAdrXLU7G9FhzeOHfovmG4kyXIb97cnWRL7Wxc5Wy4YXbjLo3Bhk21d2EeFis45 p0m54FpLC9o1cqEl8+wGLUaAVDXJj8idaXC52fbeLtNd4nkKpNgtyD67UODgMl0dbeb3 WB0w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1707398153; s=strato-dkim-0003; d=gjlay.de; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=hSGOpCedjNq2Jwm2dM0CiVCTPc8vUHAoz6CSfwciYUU=; b=dlK7GiYv6ofn7hWS7THbexQIfE9bNmLX35kMLhs/P5QfapU72R/k36tlSj9iwGgC61 NJlujdfSwNRM47nrfZAA== X-RZG-AUTH: ":LXoWVUeid/7A29J/hMvvT3koxZnKT7Qq0xotTetVnKkSgcSjpmy9KwoMJ/K0VA==" Received: from [192.168.2.102] by smtp.strato.de (RZmta 49.11.2 DYNA|AUTH) with ESMTPSA id Lb68c6018DFrUFH (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Thu, 8 Feb 2024 14:15:53 +0100 (CET) Message-ID: Date: Thu, 8 Feb 2024 14:15:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Georg-Johann Lay To: gcc-patches@gcc.gnu.org Subject: [patch,avr,applied] Tidy up gen-avr-mmcu-specs.cc X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790336775241466081 X-GMAIL-MSGID: 1790336775241466081 This patchlet tidies up gen-avr-mmcu-specs.cc. Some information was computed more than once, in different functions. The patch uses a new struct to pass around information. Johann AVR: Tidy up gen-avr-mmcu-specs.cc gcc/ * config/avr/gen-avr-mmcu-specs.cc (struct McuInfo): New. (main, print_mcu, diagnose_mrodata_in_ram): Pass it down. diff --git a/gcc/config/avr/gen-avr-mmcu-specs.cc b/gcc/config/avr/gen-avr-mmcu-specs.cc index 41ebfa82eb5..ea69145d404 100644 --- a/gcc/config/avr/gen-avr-mmcu-specs.cc +++ b/gcc/config/avr/gen-avr-mmcu-specs.cc @@ -129,62 +129,70 @@ static const bool have_avrxmega3_rodata_in_flash = false; #endif -static void -diagnose_mrodata_in_ram (FILE *f, const char *spec, const avr_mcu_t *mcu) +struct McuInfo { - enum avr_arch_id arch_id = mcu->arch_id; - const avr_arch_t *arch = &avr_arch_types[arch_id]; - const bool is_arch = mcu->macro == NULL; - const bool flmap = (mcu->dev_attribute & AVR_ISA_FLMAP); - const bool have_flmap2 = have_avrxmega2_flmap && arch_id == ARCH_AVRXMEGA2; - const bool have_flmap4 = have_avrxmega4_flmap && arch_id == ARCH_AVRXMEGA4; - const bool have_flmap = flmap && (have_flmap2 || have_flmap4); - - const bool rodata_in_flash = (arch_id == ARCH_AVRTINY - || (arch_id == ARCH_AVRXMEGA3 - && have_avrxmega3_rodata_in_flash)); + enum avr_arch_id arch_id; + const avr_arch_t *arch; + bool is_arch, is_device; + bool flmap, have_flmap2, have_flmap4, have_flmap; + bool rodata_in_flash; // Device name as used by the vendor, extracted from "__AVR___". char mcu_Name[50] = { 0 }; - if (! is_arch) - snprintf (mcu_Name, 1 + strlen (mcu->macro) - strlen ("__AVR___"), - "%s", mcu->macro + strlen ("__AVR_")); + McuInfo (const avr_mcu_t *mcu) + : arch_id (mcu->arch_id), arch (& avr_arch_types[arch_id]), + is_arch (mcu->macro == NULL), is_device (! is_arch), + flmap (mcu->dev_attribute & AVR_ISA_FLMAP), + have_flmap2 (have_avrxmega2_flmap && arch_id == ARCH_AVRXMEGA2), + have_flmap4 (have_avrxmega4_flmap && arch_id == ARCH_AVRXMEGA4), + have_flmap (flmap && (have_flmap2 || have_flmap4)), + rodata_in_flash (arch_id == ARCH_AVRTINY + || (arch_id == ARCH_AVRXMEGA3 + && have_avrxmega3_rodata_in_flash)) + { + if (is_device) + snprintf (mcu_Name, 1 + strlen (mcu->macro) - strlen ("__AVR_" "__"), + "%s", mcu->macro + strlen ("__AVR_")); + } +}; + + +static void +diagnose_mrodata_in_ram (FILE *f, const char *spec, const avr_mcu_t *mcu, + const McuInfo &mi) +{ fprintf (f, "%s:\n", spec); - if (rodata_in_flash && is_arch) + if (mi.rodata_in_flash && mi.is_arch) fprintf (f, "\t%%{mrodata-in-ram: %%e-mrodata-in-ram is not supported" " for %s}", mcu->name); - else if (rodata_in_flash) + else if (mi.rodata_in_flash) fprintf (f, "\t%%{mrodata-in-ram: %%e-mrodata-in-ram is not supported" - " for %s (arch=%s)}", mcu_Name, arch->name); - else if (is_arch) + " for %s (arch=%s)}", mi.mcu_Name, mi.arch->name); + else if (mi.is_arch) { - if (! have_flmap2 && ! have_flmap4) + if (! mi.have_flmap2 && ! mi.have_flmap4) fprintf (f, "\t%%{mno-rodata-in-ram: %%e-mno-rodata-in-ram is not" " supported for %s}", mcu->name); } - else if (! have_flmap) + else if (! mi.have_flmap) fprintf (f, "\t%%{mno-rodata-in-ram: %%e-mno-rodata-in-ram is not supported" - " for %s (arch=%s)}", mcu_Name, arch->name); + " for %s (arch=%s)}", mi.mcu_Name, mi.arch->name); fprintf (f, "\n\n"); } static void -print_mcu (const avr_mcu_t *mcu) +print_mcu (const avr_mcu_t *mcu, const McuInfo &mi) { const char *sp8_spec; const char *rcall_spec; const avr_mcu_t *arch_mcu; - const avr_arch_t *arch; - enum avr_arch_id arch_id = mcu->arch_id; for (arch_mcu = mcu; arch_mcu->macro; ) arch_mcu--; - if (arch_mcu->arch_id != arch_id) + if (arch_mcu->arch_id != mi.arch_id) exit (EXIT_FAILURE); - arch = &avr_arch_types[arch_id]; - char name[100]; if (snprintf (name, sizeof name, "specs-%s", mcu->name) >= (int) sizeof name) exit (EXIT_FAILURE); @@ -196,29 +204,26 @@ print_mcu (const avr_mcu_t *mcu) bool rmw = (mcu->dev_attribute & AVR_ISA_RMW) != 0; bool sp8 = (mcu->dev_attribute & AVR_SHORT_SP) != 0; bool rcall = (mcu->dev_attribute & AVR_ISA_RCALL); - bool flmap = (mcu->dev_attribute & AVR_ISA_FLMAP); - bool is_arch = mcu->macro == NULL; - bool is_device = ! is_arch; int rodata_pm_offset = 0; int pm_base_address = 0; - if (arch->flash_pm_offset + if (mi.arch->flash_pm_offset && mcu->flash_pm_offset - && mcu->flash_pm_offset != arch->flash_pm_offset) + && mcu->flash_pm_offset != mi.arch->flash_pm_offset) { rodata_pm_offset = mcu->flash_pm_offset; } - if (arch->flash_pm_offset) + if (mi.arch->flash_pm_offset) { pm_base_address = mcu->flash_pm_offset ? mcu->flash_pm_offset - : arch->flash_pm_offset; + : mi.arch->flash_pm_offset; } - if (is_arch - && (ARCH_AVR2 == arch_id - || ARCH_AVR25 == arch_id)) + if (mi.is_arch + && (ARCH_AVR2 == mi.arch_id + || ARCH_AVR25 == mi.arch_id)) { // Leave "avr2" and "avr25" alone. These two architectures are // the only ones that mix devices with 8-bit SP and 16-bit SP. @@ -229,8 +234,8 @@ print_mcu (const avr_mcu_t *mcu) sp8_spec = sp8 ? "-msp8" :"%name); + if (mi.is_arch) + fprintf (f, "core architecture %s\n", mi.arch->name); else - fprintf (f, "device %s (core %s, %d-bit SP%s%s)\n", mcu->name, - arch->name, sp8 ? 8 : 16, rcall ? ", short-calls" : "", - have_flmap ? ", FLMAP" : ""); + fprintf (f, "device %s (core %s, %d-bit SP%s%s)\n", mi.mcu_Name, + mi.arch->name, sp8 ? 8 : 16, rcall ? ", short-calls" : "", + mi.have_flmap ? ", FLMAP" : ""); fprintf (f, "%s\n", header); - if (is_device) + if (mi.is_device) fprintf (f, "%s\n", help_copy_paste); #if defined (WITH_AVRLIBC) // AVR-LibC specific. See avrlibc.h for the specs using them as subspecs. - if (is_device) + if (mi.is_device) { fprintf (f, "*avrlibc_startfile:\n"); fprintf (f, "\tcrt%s.o%%s", mcu->name); @@ -280,7 +282,7 @@ print_mcu (const avr_mcu_t *mcu) #endif // WITH_AVRLIBC // Diagnose usage of -m[no-]rodata-in-ram. - diagnose_mrodata_in_ram (f, "*check_rodata_in_ram", mcu); + diagnose_mrodata_in_ram (f, "*check_rodata_in_ram", mcu, mi); // avr-gcc specific specs for the compilation / the compiler proper. @@ -306,7 +308,7 @@ print_mcu (const avr_mcu_t *mcu) // avr-gcc specific specs for assembling / the assembler. - fprintf (f, "*asm_arch:\n\t-mmcu=%s\n\n", arch->name); + fprintf (f, "*asm_arch:\n\t-mmcu=%s\n\n", mi.arch->name); #ifdef HAVE_AS_AVR_MLINK_RELAX_OPTION fprintf (f, "*asm_relax:\n\t%s\n\n", ASM_RELAX_SPEC); @@ -346,16 +348,16 @@ print_mcu (const avr_mcu_t *mcu) fprintf (f, "*link_relax:\n\t%s\n\n", LINK_RELAX_SPEC); fprintf (f, "*link_arch:\n\t%s", link_arch_spec); - if (is_device + if (mi.is_device && rodata_pm_offset) fprintf (f, " --defsym=__RODATA_PM_OFFSET__=0x%x", rodata_pm_offset); fprintf (f, "\n\n"); - if (is_device) + if (mi.is_device) { fprintf (f, "*link_data_start:\n"); if (mcu->data_section_start - != arch->default_data_section_start) + != mi.arch->default_data_section_start) fprintf (f, "\t%%{!Tdata:-Tdata 0x%lX}", 0x800000UL + mcu->data_section_start); fprintf (f, "\n\n"); @@ -371,10 +373,10 @@ print_mcu (const avr_mcu_t *mcu) // Specs known to GCC. - if (is_device) + if (mi.is_device) { fprintf (f, "*self_spec:\n"); - fprintf (f, "\t%%name); + fprintf (f, "\t%%name); fprintf (f, "%s ", flmap_spec); fprintf (f, "%s ", rcall_spec); fprintf (f, "%s\n\n", sp8_spec); @@ -394,18 +396,15 @@ print_mcu (const avr_mcu_t *mcu) fprintf (f, " -U__AVR_PM_BASE_ADDRESS__"); fprintf (f, " -D__AVR_PM_BASE_ADDRESS__=0x%x", pm_base_address); } - if (have_flmap) + if (mi.have_flmap) fprintf (f, " -D__AVR_HAVE_FLMAP__"); fprintf (f, "\n\n"); // *cpp_mcu - const bool rodata_in_flash = (arch_id == ARCH_AVRTINY - || (arch_id == ARCH_AVRXMEGA3 - && have_avrxmega3_rodata_in_flash)); fprintf (f, "*cpp_rodata_in_ram:\n\t-D__AVR_RODATA_IN_RAM__="); - if (rodata_in_flash) + if (mi.rodata_in_flash) fprintf (f, "0"); - else if (! have_flmap) + else if (! mi.have_flmap) fprintf (f, "1"); else fprintf (f, "%%{!mrodata-in-ram:%%{!mno-rodata-in-ram:0}}" @@ -429,7 +428,7 @@ print_mcu (const avr_mcu_t *mcu) int main (void) { for (const avr_mcu_t *mcu = avr_mcu_types; mcu->name; mcu++) - print_mcu (mcu); + print_mcu (mcu, McuInfo (mcu)); return EXIT_SUCCESS; }